A Simple, Comprehensive Overview of Javascript
betterexplained.com
betterexplained.com
The radix is not always 10 by default, it's implementation dependent and sometime it even depends on the number to be parsed. "8" will be parsed in base 10, "08" in base 8. Always specify the radix [1]
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Other than that, awesome post. I always love just seeing the code vs. reading about it in a book. I find it's easier to learn that way, especially when the language you're coming from has a lot of similarities.
EDIT: To clarify, I have no affiliation with 'JS is Sexy', I just think the lessons/tutorials Richard Bovell writes are awesome!
I agree with the examples vs. trying to read in a book. Books often get in their own way, trying to overgeneralize: just show me the code! If I already know how to program, having 5-10 reference examples of every language feature should be enough. You don't need to explain what a conditional is, etc.
I'll put in a link to that object deep dive :).
Don't pass a string as first argument to setTimeout.
var myEval = new Function("my().stuff().to().eval();");
myEval();Dont do that, redirect when javascript IS enabled(if it is a SPA). or you'll take a huge SEO hit. your website should be usable without javascript anyway. the SPA itself doesnt care about SEO because it is not crawlable anyway.