

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Learn JavaScript
incomplete
2: Basic Variables
incomplete
3: let and const
incomplete
4: Why JavaScript?
incomplete
5: Comments
incomplete
6: Numbers in JS
incomplete
7: Numbers Review
incomplete
8: Increment and Decrement
incomplete
9: Undefined vs. Undeclared
incomplete
10: Null vs. Undefined
incomplete
11: Dynamic and Weak
incomplete
12: Same Line Declarations
incomplete
13: JavaScript's Speed
incomplete
14: Strings
incomplete
15: Template Literals
incomplete
16: Java vs. JavaScript
incomplete
17: Semi-Colons in JS
incomplete
18: String Encoding
incomplete
19: Camel Case in JS
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The var keyword declares a variable the sad way. For example:
var mySkillIssues = 42;
Some of JavaScript's most common variable types are:
number: represents both integer and floating-point numbersboolean: either true or falsestring: a sequence of charactersundefined: a variable that hasn't been assigned a valuevar smsSendingLimit = 100;
var isAdmin = true;
var username = "wagslane";
var nothing = undefined;
Don't worry, we'll talk about a better way to declare variables in the next lesson.
Run (but don't submit yet) the code. Notice that the username is blank!
Set the username variable to the value "eddie_cabot". Then submit the fixed code.