var x = 12
var blah = "some text that i'm writing right now!"
blah = x
y = blah - x
var universities = ["UofT", "Western", "McMaster"];
universities[0] //will return "UofT"
if (condition) {
// block of code to be executed if the condition is true
}
An example from https://www.w3schools.com/js/js_if_else.asp
if (hour < 18) {
greeting = "Good day";
}
else {
greeting = "Good evening"
}
What would this return now?
var i;
for (i = 0; i < universities.length; i++) {
text += universities[i] + "<br>";
}
/*will print:
UofT
Western
McMaster
*/