Earlier quoted context omitted.
Nice. Thanks for sharing. Bravo for burrito recipe. I'm convinced I became a programmer in 4th grade. Our creative writing assignment was instructions for making a peanut butter & jelly sandwich. Then our teacher followed our instructions literally. Hilarity ensued. --- I think the Intro's link to the local env setup in the appendix is broken. Anymore, I always check the colophon first, then decide to proceed. I appl…
Re: nodeJS versions, I'd go with something like "Install NodeJS, this book was written with version x.y.z"; I don't think JS will become backwards incompatible in the near future, so as long as the book doesn't contain experimental or unofficial JS features, it should be fine for the next 5-10 years.
Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
81–90 of 113 posts
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#82Hi all, author here. Backstory: I'm a CS engineer/teacher and this book is a side project started in December 2016. You can read a bit more about it here: https://medium.com/@bpesquet/walk-this-javascript-way-e9c45a... . The writing process is now completed and I'm actively looking for feedback to make the book better. Any opinion or advice about content, pricing, or that hastily created Leanpub cover would be greatl…
This is a great idea but ES2017 instead of ES2015 would make it even easier for newcomers. This would allow `await` which is a lot easier for newcomers to follow than callbacks or .then(). Also you really want string.includes() ! Node and all current browsers support ES2017 so you don't really lose anything either.
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#83Hi all, author here. Backstory: I'm a CS engineer/teacher and this book is a side project started in December 2016. You can read a bit more about it here: https://medium.com/@bpesquet/walk-this-javascript-way-e9c45a... . The writing process is now completed and I'm actively looking for feedback to make the book better. Any opinion or advice about content, pricing, or that hastily created Leanpub cover would be greatl…
This is a great idea but ES2017 instead of ES2015 would make it even easier for newcomers. This would allow `await` which is a lot easier for newcomers to follow than callbacks or .then(). Also you really want string.includes() ! Node and all current browsers support ES2017 so you don't really lose anything either.
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#84Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#85Hi all, author here. Backstory: I'm a CS engineer/teacher and this book is a side project started in December 2016. You can read a bit more about it here: https://medium.com/@bpesquet/walk-this-javascript-way-e9c45a... . The writing process is now completed and I'm actively looking for feedback to make the book better. Any opinion or advice about content, pricing, or that hastily created Leanpub cover would be greatl…
If I missed all this in my skim, please forgive.
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#86Earlier quoted context omitted.
The only reason I can think of is if you want hoisting for some reason. For example, if you want to call functions before they are declared. Personally, I don't like that style, but some people do.
let / const are both hoisted though, they're just hoisted to the top of the current block scope instead of function scope.
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#87Earlier quoted context omitted.
let / const are both hoisted though, they're just hoisted to the top of the current block scope instead of function scope.
Sort of, but the effect is very different due to the "temporal dead zone." Attempting to access a variable declared with `let/const` or const before the declaration will throw an error, vs just getting `undefined` for a variable declared with `var`.
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#88Another great JS book on github... https://github.com/getify/You-Dont-Know-JS
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#89Earlier quoted context omitted.
I find function lexical scope more natural for JavaScript which is very function orientated, where you pass functions around and use closures a lot. I also find it a PITA having to declare variables before the block, instead of where they are first used. Ex: if(..) { ... huge block of code .. var foo = 1; } Means I do not have to scroll back and forth to declare and set the variables at different places.
In strict mode JS runtimes will hoist the `var` declaration to the top of the declared scope anyway. So `foo` would be declared at the start of the containing function scope, regardless of where you appear to declare them.
Re: Show HN: The JavaScript Way, a book for learning modern JavaScript from scratch
#90I think that the best book ever about JS for everyone, especially for those starting from scratch is https://github.com/getify/You-Dont-Know-JS you simply don't need anything else