NYC Codecademy Group - JavaScript Quiz

17 Questions | Total Attempts: 254

SettingsSettingsSettings
Please wait...
JavaScript Quizzes & Trivia

This quiz will test your knowledge of JavaScript. Good Luck! -Ron


Questions and Answers
  • 1. 
    Var numbers = [1, 2, 3] is an example of:
    • A. 

      Array

    • B. 

      Function

    • C. 

      Object

    • D. 

      Method

  • 2. 
    Var = myName is an example of a
    • A. 

      Variable

    • B. 

      String

    • C. 

      Object

    • D. 

      Method

  • 3. 
    Select which of the options below are data types
    • A. 

      Number

    • B. 

      String

    • C. 

      Function

    • D. 

      Boolean

  • 4. 
    I++
    • A. 

      Incrementor

    • B. 

      Operator

    • C. 

      Iterator

    • D. 

      Decrementor

  • 5. 
    Var i; for (i = 0; i < 2; i++) {   console.log("i is now equal to " + i);
    • A. 

      Function

    • B. 

      Object

    • C. 

      For Loop

    • D. 

      While Loop

  • 6. 
    is an example of a
    • A. 

      Method

    • B. 

      Object

    • C. 

      Function

    • D. 

      Variable

  • 7. 
    Var i = 0; while ( i < 2 ) {   console.log( "i is now " + i );   i++; }
    • A. 

      While Loop

    • B. 

      Incrementor

    • C. 

      For Loop

    • D. 

      Function

  • 8. 
    if (name.length > 0) { console.log("Please enter your name."); } else { console.log("Hello " + name); } is an example of:
    • A. 

      If Statement

    • B. 

      If...Else Statement

    • C. 

      Else If Statement

    • D. 

      Switch Statement

  • 9. 
    switch (GPA){ case 90: letterGrade = "A+"; break; case 80: letterGrade = "A"; break; case 70: letterGrade = "C"; break; case 60: letterGrade = "D"; break; case 50: letterGrade = "E"; break; default: letterGrade = "F"; break; }
    • A. 

      If...Else Statement

    • B. 

      Ternary Operator

    • C. 

      Else If Statement

    • D. 

      Switch Statement

  • 10. 
    is an example of
    • A. 

      If statement

    • B. 

      If...Else Statement

    • C. 

      Switch Statement

    • D. 

      Ternary Operator

  • 11. 
    For the object below, what does the word 'name' represent? var dog = {name: "Daisy", age: 6};
    • A. 

      Property

    • B. 

      Variable

    • C. 

      Value

    • D. 

      String

  • 12. 
    Var dog = (); dog.name = "Daisy"; dog.age = 6; is an example of creating an object using:
    • A. 

      Object Literal Notation

    • B. 

      Object Constructor Notation

    • C. 

      Dot Notation

    • D. 

      Bracket Notation

  • 13. 
    is an example of creating an object using:
    • A. 

      Dot Notation

    • B. 

      Object Literal Notation

    • C. 

      Bracket Notation

    • D. 

      Object Constructor Notation

  • 14. 
    Var dogName = dog.name is an example of accessing an object's property using:
    • A. 

      Dot Notation

    • B. 

      Bracket Notation

    • C. 

      Object Literal Notation

    • D. 

      Object Constructor Notation

  • 15. 
    is an example of accessing an object's property using:
    • A. 

      Object Literal Notation

    • B. 

      Bracket Notation

    • C. 

      Dot Notation

    • D. 

      Object Literal Notation

  • 16. 
    is an example of a:
    • A. 

      Method

    • B. 

      Variable

    • C. 

      Object

    • D. 

      Function

  • 17. 
    In the function below, what does the text '(w, l)' represent? var area = function (w, l) {   return w * l; };
    • A. 

      Variables

    • B. 

      Parameters

    • C. 

      Strings

    • D. 

      Object