A Smarter Way To Learn!!

ideabulb ideabulb

JavaScript

ChapterOne(1)...

Statement:
alert("Hello world!!");

ChapterTwo(2)...

Statement:
var myBrand; myBrand = VA Hosting; alert("We are " + myBrand);

ChapterThree(3)...

Statement:
var servers; servers = 1; var newServers = servers + 1; alert("Thank for join us! Now we are " + newQuantity + " !);

ChapterFour(4)...

Statement:
alert("Variable names can only contain letters, numbers, the '$' symbol, and the '_' symbol. Letters can be capital but are case sensitive. Numbers can only come after the first letter. The '$' or '_' can be in any order.");

ChapterFive(5)...

Statement:
var ch5computers; ch5computers = 15; var newch5machines = ch5computers - 2; alert("Unfortunatelly, now we have only " + newch5machines" + machines out of " + ch5computers + "!");

ChapterSix(6)...

Statement:
var fifth = 5; var six = ++fifth; alert("this chapter is the fifth plus one, which is equal to: " + fifth + six + "!");

ChapterSeven(7)...

Statement:
var class1 = 50; var class2 = 2; var class3 = 15; var totalClass = (class1 * class2) + class3; alert("The class we are taking is: "WEB " + totalClass);

ChapterEight(8)...

Statement:
var ch8alert = "Concatenated alerts contain the addition(+) symbol more than one (" + 1 + ") times"; alert(ch8alert);

ChapterNine(9)...

Statement:
var namePrompt = "Please input your name:"; var defaultAnswer = "YourName"; var username = prompt(namePrompt, defaultAnswer); alert("We will be happy to host a server for you, " + username);

ChapterTen(10)...

Statement:
var ch10question = prompt(""Do you know what is the main campus of CPCC?"); if (ch10question === "Central" || ch10question === "central" || ch10question === "CENTRAL") { alert("Thats right!"); } else { alert("Sorry, thats not the main campus!"); }