Write, mentally evaluate, and store the result of JS expressions
- Describe what a programming language is
- List reasons for learning JavaScript
function loadFile(filename) { | |
let script = ... create script with file | |
let promise = new Promise() | |
script.onload = promise.resolve | |
return promise | |
} |
brew install git
... | |
var legacyScriptsArr = [ | |
'./path/to/legacy-script1.js', | |
'./path/to/legacy-script2.js', | |
'./path/to/legacy-script3.js', | |
'./path/to/legacy-script4.js', | |
'./path/to/legacy-script5.js', | |
]; |
var age_group = | |
age > 70 ? 'se' : | |
age > 60 ? 'si' : | |
age > 50 ? 'fi' : | |
age > 40 ? 'fo' : | |
age > 30 ? 'th' : | |
age > 20 ? 'tw' : | |
'un'; |