Hacker Newsnew | comments | ask | jobs | submitlogin
phzbOx 815 days ago | link | parent

I rarely use ifs and whiles using javascript.. There are better, higher level libraries that take care of it for you. As a bonus, some of them let you make it * paralleled* with the same syntax. Obviously, when you switch to a new language, you need to learn their new paradigms / designs.


robfig 815 days ago | link

Rarely use ifs?

What do you do if you want to see if, e.g. there are any results for the user's query?

I would do

if (results.length > 0)

or something

-----

adgar 815 days ago | link

> As a bonus, some of them let you make it * paralleled* with the same syntax.

JavaScript is single-threaded, so parallelism within a single JS VM is not possible.

-----

phzbOx 815 days ago | link

Hence the *

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: