Variables

// declaring one javascript variable

var firstName;


// declaring multiple javascript variables

var firstName, lastName;


// declaring and assigning one javascript variable

var firstName = 'Homer';


// declaring and assigning multiple javascript variables

var firstName = 'Homer', lastName = 'Simpson';



HOME