This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
pe:javascript [2021/06/13 08:27] admin created |
pe:javascript [2021/06/13 08:31] (current) admin |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| ==== Strings (no Char) ==== | ==== Strings (no Char) ==== | ||
| - | < | + | * single or double quotes, or backtick |
| - | < | + | |
| - | < | + | |
| - | < | + | * + for concatenation |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| ==== unary operators ==== | ==== unary operators ==== | ||
| Line 45: | Line 42: | ||
| * console.log(null == undefined); | * console.log(null == undefined); | ||
| - | * %%//%% ΓåÆ | + | * // → true |
| * console.log(null == 0); | * console.log(null == 0); | ||
| - | * %%//%% ΓåÆ | + | * // → false |
| * to do comparisons without type conversion, use === and !== | * to do comparisons without type conversion, use === and !== | ||
| Line 64: | Line 61: | ||
| * for: | * for: | ||
| * updated to for(let entry of JOURNAL) {…} %%//%% avoids need for counter | * updated to for(let entry of JOURNAL) {…} %%//%% avoids need for counter | ||
| - | + | <code> | |
| - | > for (let number = 0; number <= 12; number = number + 2) { console.log(number); | + | |
| + | </ | ||
| * break | * break | ||
| * switch .. case & default (like C/Java) | * switch .. case & default (like C/Java) | ||
| - | * donΓÇÖt | + | * don' |
| * camelCaseNamingConvention | * camelCaseNamingConvention | ||
| - | * C-style comments | + | * C-style comments |
| ==== Exercises ==== | ==== Exercises ==== | ||