Quotes help make search much faster. Example: "Practice Makes Perfect"

Tuesday, December 4, 2012

Codecademy: Codeyear Primitives in conditionals


//sample solution


var primitive = "chocolate";

if ( primitive === "chocolate" ) {
    console.log("Mmm... chocolate.");
}

var primitive = 4;

if ( primitive < 5 ) {
console.log("That is a nice low number.");
}

var primitive = false;

if ( !primitive === true ) {
console.log("I am not not telling the truth.");
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts