NextGen Knowledge Center

Variables

Unassigned variables have the value undefined by default; string literals can use single or double quotes; braces { } create a block of statements that can be used for loops, conditionals, and statements. These are some examples of variable declarations:


var x;
var y = r;
z = "abc"