1Best Cheat Sheet:
2https://websitesetup.org/wp-content/uploads/2020/09/Javascript-Cheat-Sheet.pdf
1Finally found out JavaScript Cheatsheet in PDF format :)
2
3Check this 4 JavaScript Cheatsheet in PDF format:
4https://buggyprogrammer.com/cheat-sheet-for-javascript
5
1var abc = "abcdefghijklmnopqrstuvwxyz";
2var esc = 'I don\'t \n know'; // \n new line
3var len = abc.length; // string length
4abc.indexOf("lmno"); // find substring, -1 if doesn't contain
5abc.lastIndexOf("lmno"); // last occurance
6abc.slice(3, 6); // cuts out "def", negative values count from behind
7abc.replace("abc","123"); // find and replace, takes regular expressions
8abc.toUpperCase(); // convert to upper case
9abc.toLowerCase(); // convert to lower case
10abc.concat(" ", str2); // abc + " " + str2
11abc.charAt(2); // character at index: "c"
12abc[2]; // unsafe, abc[2] = "C" doesn't work
13abc.charCodeAt(2); // character code at index: "c" -> 99
14abc.split(","); // splitting a string on commas gives an array
15abc.split(""); // splitting on characters
16128.toString(16); // number to hex(16), octal (8) or binary (2)
17
1/* Convenient interactive cheat sheet */ 'https://htmlcheatsheet.com/js/'
2/* PDF VERSION */'https://websitesetup.org/wp-content/uploads/2020/09/Javascript-Cheat-Sheet.pdf'
1if ((age >= 14) && (age < 19)) { // logical condition
2status = "Eligible."; // executed if condition is true
3} else { // else block is optional
4status = "Not eligible."; // executed if condition is false
5}
6