This site is absolutely awesome and I would suggest this to new comers and experienced folks alike. It covers all things related to javascript, explains the concepts really well in a practical day to day application point of view. I might be sounding like a promoter for it, but it really added a lot of value for me personally, so just wanted to spread the good word.
I just wish it didn't have Disqus :(
A Modern JavaScript Tutorial
261–270 of 299 posts
Re: A Modern JavaScript Tutorial
#262Re: A Modern JavaScript Tutorial
#263The Loops section gives a very brief description of what loops are. This doesn't introduce anything of value to an experienced programmer, and it's nowhere near enough of an explanation for teaching imperative programming to a beginner.
Personally I'd suggest targeting experienced programmers. I only learnt JavaScript relatively recently, and I found it very frustrating that every JavaScript tutorial I could find was aimed at beginners (and that isn't an exaggeration).
Re: A Modern JavaScript Tutorial
#264Earlier quoted context omitted.
>I have yet to encounter a single "gotcha" out of omitting semicolons. keyword "yet". It seems like such a insignificant win, with the downside being some very hard to debug runtime error because one element of your build chain has a bug or misses an edge case. I honestly don't see the logic.
It just makes the code slightly easier to read. The semicolon is just noise.
Re: A Modern JavaScript Tutorial
#265Earlier quoted context omitted.
It just makes the code slightly easier to read. The semicolon is just noise.
Semicolons aren't noise; you've read the statement before you even get to them so how can they be noise? Noise would be type info added to languages that didn't have it before, such as TypeScript. Generics can get pretty gnarley too, when you have nested typing info involved.
Re: A Modern JavaScript Tutorial
#266As someone who doesn't use Javascript much... is there a way to force it to copy the current state of the original variable to the new variable, without it being a reference and without having to use something like lodash?
Re: A Modern JavaScript Tutorial
#267This is great. However, it gives the example of copying a variable by assigning another variable to it. This doesn't copy a variable's contents - it makes the new variable a pointer to the original variable. As someone who doesn't use Javascript much... is there a way to force it to copy the current state of the original variable to the new variable, without it being a reference and without having to use something li…
Re: A Modern JavaScript Tutorial
#268This site is absolutely awesome and I would suggest this to new comers and experienced folks alike. It covers all things related to javascript, explains the concepts really well in a practical day to day application point of view. I might be sounding like a promoter for it, but it really added a lot of value for me personally, so just wanted to spread the good word.
I just wish it didn't have Disqus :(
Re: A Modern JavaScript Tutorial
#269This is great. However, it gives the example of copying a variable by assigning another variable to it. This doesn't copy a variable's contents - it makes the new variable a pointer to the original variable. As someone who doesn't use Javascript much... is there a way to force it to copy the current state of the original variable to the new variable, without it being a reference and without having to use something li…
One way to have a deep copy which shares nothing is const copy = JSON.parse(JSON.stringify(object)); but that may not always work. In short, copying a arbitrarily large object will probably waste memory, so it should be a little hard so you don't do it unless it's really necessary.
Re: A Modern JavaScript Tutorial
#270This is great. However, it gives the example of copying a variable by assigning another variable to it. This doesn't copy a variable's contents - it makes the new variable a pointer to the original variable. As someone who doesn't use Javascript much... is there a way to force it to copy the current state of the original variable to the new variable, without it being a reference and without having to use something li…