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