Lesson 2 Flashcards
1
Q
if statement syntaxis
A
if(condition){ method(); } else{ }
2
Q
Equal in JavaScript
A
===
3
Q
Loops syntaxis
A
- For statement for(var i =0; i
4
Q
Examining objects in an array with for
A
for(index in array){
array[index];
}
5
Q
Function syntaxis
A
function myFunc(param){ }
6
Q
Code to get click coordinates
A
$(document).click(function(loc) { var x = loc.pageX; var y = loc.pageY; logClicks(x,y); });
7
Q
Encapsulation or declaration object’s functions
A
projects.display = function(){
};
- display is the name of the function.