This is probably a fine resource. Can't really judge it - I avoid JavaScript to the extend humanly possible. But please - could someone end the devaluation of the word cheatsheet . A cheatsheet should be just that - a sheet of paper or its digital equivalent, with a few short, clear notes of essentials. Not a rambling document. Not something with a table of contents.
Cheatsheet for the modern JavaScript
31–37 of 37 posts
Re: Cheatsheet for the modern JavaScript
#32I usually just do just enough javascript, but didn't know the difference between let and var, not it makes sense. the explanation of reduce made sense too.
`let` is block scoped, while `var` is function scoped. Essentially: function do_something() { if (true) { var x = 42; let y = 42; } console.log(x); // 42 console.log(y); // Reference error: y is not defined } It's extremely useful in for loops: for (var i = 0; i 5, 5, 5, 5, 5 } for (let i = 0; i 0, 1, 2, 3, 4 }
Re: Cheatsheet for the modern JavaScript
#33Earlier quoted context omitted.
Summary? Overview?
Judging by the downvotes, I think that post was misinterpreted. I was suggesting that the word "cheatsheet" could be replaced by "summary" or "overview". E.g. "An overview of modern JavaScript" or "Modern JavaScript - Executive Summary"
Re: Cheatsheet for the modern JavaScript
#34Rules for this in JS from top to bottom in priority: 1. The function was called with 'new' 2. The function was called with 'call' or 'apply' specifying an explicit this 3. The function was called via a containing/owning object (context) 4. DEFAUL: global object (expect strict mode--undefined)
Re: Cheatsheet for the modern JavaScript
#35Re: Cheatsheet for the modern JavaScript
#36Earlier quoted context omitted.
Thank you. For comparison, these are real cheatsheets: * https://zeroturnaround.com/wp-content/uploads/2017/03/regex-... * https://rumorscity.com/wp-content/uploads/2014/08/10-Best-VI... * https://wch.github.io/latexsheet/latexsheet-1.png
High res versions: Regex: https://i.imgur.com/f47LvfU.png Vim: https://i.imgur.com/YLInLlY.png Latex: no hi res version but PDF + 2nd page! here https://wch.github.io/latexsheet/
Re: Cheatsheet for the modern JavaScript
#37Earlier quoted context omitted.
High res versions: Regex: https://i.imgur.com/f47LvfU.png Vim: https://i.imgur.com/YLInLlY.png Latex: no hi res version but PDF + 2nd page! here https://wch.github.io/latexsheet/
Thanks but due to imgur’s recent update these are even lower resolution than the quick finds in my original post (on mobile). I’ll post full-size links when I get to a PC.