Javascript Basics (9-12)

Card Set Information

Author:
dalbabes
ID:
60458
Filename:
Javascript Basics (9-12)
Updated:
2012-07-26 12:42:06
Tags:
javascript
Folders:

Description:
Oreilly
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user dalbabes on FreezingBlue Flashcards. What would you like to do?


  1. 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.
  2. 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) {}
  3. What operator finds the remainder of a division?
    Modulus %
  4. Single increment operator
    ++ or -- for going down
  5. Compare vs assign
    • Compare ==
    • Assign =
  6. Compare operator for not equal
    !=
  7. 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!
  8. 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 &&
  9. Create a while loop
    while (condition) {}
  10. 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++)

What would you like to do?

Home > Flashcards > Print Preview