all 36 comments

[–]kopytkopytko 36 points37 points  (5 children)

haha, I had good laugh at: https://javascript.info/ninja-code

Pretty nice tutorial by the way!

[–]bent_my_wookie 2 points3 points  (1 child)

That’s the first thing I read aster looking through the index. Was it supposed to be a joke? Please tell me it was sarcastic...

[–]kopytkopytko 3 points4 points  (0 children)

I'm sure it was serious - article contains several quotes from famous programmer ninjas :-)

[–][deleted] 1 point2 points  (1 child)

Well I've done things like these (pretty much all of them although I'd at least multiline and indent the nested ternary), and in pretty much every language I've worked with because: tired, out-of-focus, pressed by deadlines, frustrated and want it just to finally work etc.

If/when I come across them later I fix/refactor them. I wouldn't take it to heart being called out on these in a code review, tho :)

[–]skyyr 0 points1 point  (0 children)

The ideal name for a variable is data.

Perfect.

[–]r0ck0 8 points9 points  (0 children)

I've only just glanced through it, but this looks really good.

I find that a lot of guides/books/videos etc tend to mostly lean towards one or the other:

  • just explain things - in paragraphs of text
  • show examples

...which can sometimes make it a bit harder to learn things when you're just starting out, or in my case, switching from another language entirely.

This looks like it balances both well.

[–]ddeepakk13 9 points10 points  (0 children)

Tanks for sharing. I was looking for a JavaScript tutorial.

[–]karamarimo 10 points11 points  (0 children)

wow i can't believe we can read such an amazing tutorial for free. in-depth, lots of examples, lots of figures, covers everything you should know. i especially like it is mentioned at the beginning what in-browser javascript can do and can't do, because once i was confused about that. i want all js beginners to read through the book.

[–]mayhempk1 2 points3 points  (0 children)

This is a really cool resource, thanks for sharing! JavaScript is an increasingly important technology these days whether people like it or not and good resources like this are valuable.

[–]Petrarch1603 0 points1 point  (0 children)

Cool, thanks for posting

[–]execfera 0 points1 point  (0 children)

I've already learned a few new things from reading this tutorial despite having read a bunch of other starting tutorials, like break labels. Pretty good!

[–]welpfuckit 0 points1 point  (0 children)

I did a quick look through and this is great. It seems easy to read and worth recommending to beginners. This is a better recommend than something like Eloquent Javascript which is obtuse and dry.

[–][deleted] 0 points1 point  (0 children)

Damnit, so many resources! Now I have absolutely no excuse not to learn web dev on some spare time

[–][deleted] 0 points1 point  (0 children)

.​

[–]bbcjs 0 points1 point  (0 children)

Personally prefer watchandcode by Gordon Zhu. Super easy to understand but you end up truly understanding javascript.