-
Basics of the language
- Variables
- Conditionals
- Iteration
- Operators
- Equality / Comparison
- Function Basics
- Arguments / Parameters
- return
-
Ternary / Short Circuit
function buttonText(isLoggedIn) {
if (isLoggedIn) {
return 'Logout';
} else {
return 'Login';
}
}
function buttonText(isLoggedIn) {
return isLoggedIn ? 'Logout' : 'Login';
}
function demo() {
const result1 = true && 'Yep';
console.log(result1); // Yep
const result2 = false && 'Nope';
console.log(result2); // false
}
- Scope
- Types of Scope
- Global Scope
- Function Scope
- Block Scope
- Module Scope
- Hoisting
- Types of Scope
- More Advanced Function Concepts
- First Class Functions
- Functions can be variables in JS
- Higher Order Functions
- A function that accepts a function as an argument
- A function that returns a function
- Closures
- First Class Functions