Lesson 2 Flashcards

1
Q

if statement syntaxis

A
if(condition){
    method();
}
else{
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Equal in JavaScript

A

===

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Loops syntaxis

A
- For statement
  for(var i =0; i
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Examining objects in an array with for

A

for(index in array){
array[index];
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Function syntaxis

A
function myFunc(param){
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Code to get click coordinates

A
$(document).click(function(loc) {
  var x = loc.pageX;
  var y = loc.pageY;
  logClicks(x,y);
});
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Encapsulation or declaration object’s functions

A

projects.display = function(){
};
- display is the name of the function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly