Home
Flashcards
Preview
Javascript Basics (9-12)
Home
Get App
Take Quiz
Create
How do you pass a parameter to a javascript function?
When the function is called, the parameter is listed
say changeBackground('more') The function itself just needs a variable so...function changeBackground(it) would work.
Pass two parameter, manny and moe to a function. Also, show how the main line of a function is created.
changeMe('manny','moe')
function changeMe(main,second) {}
What operator finds the remainder of a division?
Modulus %
Single increment operator
++ or -- for going down
Compare vs assign
Compare ==
Assign =
Compare operator for not equal
!=
If you have an if statement, how do you handle more than two options?
if () {}
else if () {}
else {} Remember that the else doesn't have parameters...ever!
If you want to check to see if two conditions are occuring in a if/else statement what operator would you use to check to conditions at the same time?
and &&
Create a while loop
while (condition) {}
What are the three statements in a for loop and how are they separated?
for (variable defined; condition,increment )
for (i=0;i<5;i++)
Author
dalbabes
ID
60458
Card Set
Javascript Basics (9-12)
Description
Oreilly
Updated
2012-07-26T16:42:06Z
Show Answers
Home
Flashcards
Preview