Variables & Datatypes

Video

JavaScript Notes

JavaScript
    //DECLARING & ASSIGNING VARIABLES
    var name = "Steve"; // Datatype String 
    var id = 34534; // Datatype Number 
    var alive = true; // Datatype Boolean 
    var fiveDs; // undefined
    
    name = "Ricky";
    name = name + " Bobby"; // string concatenation 
    console.log(name);
    
    id = 7 + 3; // expression id = id – 2;
    id = id * 4 id = id / 4;
    console.log(id);
    
    fiveDs = ["Dodge", "Duck", "Dip", "Dive", "Dodge"];
    // Array (numbered list)
    
    console.log(fiveDs.length); console.log(fiveDs[0] + " " + fiveDs[2]);
    
    //Object
    //Function
    //Date
     
    //DOM Object – Document Object Model