Outline
- JavaScript Fundamentals -- What is JavaScript?
- JavaScript Fundamentals -- Variables and Scope
- JavaScript Fundamentals -- Primitive Types
- JavaScript Fundamentals -- The this Keyword
-
JavaScript Fundamentals -- The JavaScript Console
- Introduction
- console.log + Exercise
- console.log Exercise Review
- console.info + Exercise
- console.info Exercise Review
- console.warn + Exercise
- console.warn Exercise Review
- console.error + Exercise
- console.error Exercise Review
- console.table + Exercise
- console.table Exercise Review
- console.assert + Exercise
- console.assert Exercise Review
- console.group + Exercise
- console.group Exercise Review
- Conclusion
-
JavaScript Fundamentals -- Logical and Comparison Operators
- Introduction to Logical and Comparison Operators
- Truthy and Falsy Values
- Comparison Operators -- Equality and Inequality
- Comparison Operators -- Equality and Inequality Exercise
- Comparison Operators -- Equality and Inequality Exercise Review
- Comparison Operators -- Relational
- Comparison Operators -- Relational Exercise
- Comparison Operators -- Relational Exercise Review
- Logical Operators -- Or
- Logical Operators -- Or Exercise
- Logical Operators -- Or Exercise Review
- Logical Operators -- And
- Logical Operators -- And Exercise
- Logical Operators -- And Exercise Review
- Logical Operators -- Not
- Logical Operators -- Not Exercise
- Logical Operators -- Not Exercise Review
- Logical Operators -- Nullish Coalescing
- Logical Operators -- Nullish Coalescing Exercise
- Logical Operators -- Nullish Coalescing Exercise Review
- Logical and Comparison Operators Conclusion
-
JavaScript Fundamentals -- Looping in JavaScript
- Introduction to Looping in JavaScript
- for Loops
- for Loops -- Why Use Them and Gotchas
- for ... of Loops
- Looping Exercise 1
- Looping Exercise 1 Review
- for ... in Loops
- Looping Exercise 2
- Looping Exercise 2 Review
- do while Loops
- Breaking out of Loops
- Skipping Passes Through Loops
- Looping Exercise 3
- Looping Exercise 3 Review
- Conclusion to Looping in JavaScript
-
JavaScript Fundamentals -- Functions in JavaScript
- Introduction to Functions in JavaScript
- Named Functions
- Anonymous Functions
- Arrow Functions
- Functions in JavaScript Exercise 1
- Functions in JavaScript Exercise 1 Review
- Default Parameters
- Named Parameters
- Rest Parameters
- Functions in JavaScript Exercise 2
- Functions in JavaScript Exercise 2 Review
- Functions in JavaScript Real Demo
- Conclusion to Functions in JavaScript
- JavaScript Fundamentals -- Strings, Numbers, & Dates
- JavaScript Fundamentals -- Objects in JavaScript
- JavaScript Fundamentals -- Arrays in JavaScript
- JavaScript Fundamentals -- Course Conclusion
Outline
- JavaScript Fundamentals -- What is JavaScript?
- JavaScript Fundamentals -- Variables and Scope
- JavaScript Fundamentals -- Primitive Types
- JavaScript Fundamentals -- The this Keyword
-
JavaScript Fundamentals -- The JavaScript Console
- Introduction
- console.log + Exercise
- console.log Exercise Review
- console.info + Exercise
- console.info Exercise Review
- console.warn + Exercise
- console.warn Exercise Review
- console.error + Exercise
- console.error Exercise Review
- console.table + Exercise
- console.table Exercise Review
- console.assert + Exercise
- console.assert Exercise Review
- console.group + Exercise
- console.group Exercise Review
- Conclusion
-
JavaScript Fundamentals -- Logical and Comparison Operators
- Introduction to Logical and Comparison Operators
- Truthy and Falsy Values
- Comparison Operators -- Equality and Inequality
- Comparison Operators -- Equality and Inequality Exercise
- Comparison Operators -- Equality and Inequality Exercise Review
- Comparison Operators -- Relational
- Comparison Operators -- Relational Exercise
- Comparison Operators -- Relational Exercise Review
- Logical Operators -- Or
- Logical Operators -- Or Exercise
- Logical Operators -- Or Exercise Review
- Logical Operators -- And
- Logical Operators -- And Exercise
- Logical Operators -- And Exercise Review
- Logical Operators -- Not
- Logical Operators -- Not Exercise
- Logical Operators -- Not Exercise Review
- Logical Operators -- Nullish Coalescing
- Logical Operators -- Nullish Coalescing Exercise
- Logical Operators -- Nullish Coalescing Exercise Review
- Logical and Comparison Operators Conclusion
-
JavaScript Fundamentals -- Looping in JavaScript
- Introduction to Looping in JavaScript
- for Loops
- for Loops -- Why Use Them and Gotchas
- for ... of Loops
- Looping Exercise 1
- Looping Exercise 1 Review
- for ... in Loops
- Looping Exercise 2
- Looping Exercise 2 Review
- do while Loops
- Breaking out of Loops
- Skipping Passes Through Loops
- Looping Exercise 3
- Looping Exercise 3 Review
- Conclusion to Looping in JavaScript
-
JavaScript Fundamentals -- Functions in JavaScript
- Introduction to Functions in JavaScript
- Named Functions
- Anonymous Functions
- Arrow Functions
- Functions in JavaScript Exercise 1
- Functions in JavaScript Exercise 1 Review
- Default Parameters
- Named Parameters
- Rest Parameters
- Functions in JavaScript Exercise 2
- Functions in JavaScript Exercise 2 Review
- Functions in JavaScript Real Demo
- Conclusion to Functions in JavaScript
- JavaScript Fundamentals -- Strings, Numbers, & Dates
- JavaScript Fundamentals -- Objects in JavaScript
- JavaScript Fundamentals -- Arrays in JavaScript
- JavaScript Fundamentals -- Course Conclusion
Hoisting happens under the covers in JavaScript. When a variable declared with the var
keyword is declared, the declaration is moved to the top of the variable's scope. The initialization still occurs in the same location that you entered it. This means that these variables can be used before they're declared. However, if you use the variable before it's been declared and/or initialized, the value will be undefined and your application may produce a bug because of this.
Something similar happens with functions. You can use functions in JavaScript before they're defined because of hoisting.
For more information on this topic, check out this blog post.