Study

Web 102 Mid-Semester Review

  •   0%
  •  0     0     0

  • What is the first keyword needed to define a function?
    function
  • What will be displayed when this code runs?
    You will eat Tuesday on Pizza.
  • How could you call this function named runCode?
    runCode()
  • What is the data type of the mood variable?
    String
  • Comments in JavaScript start with...
    // or /*
  • Which symbols go around the body of a function definition?
    { and }
  • What will be displayed when this code runs?
    Nothing
  • What's the data type of the value within the if statement?
    Boolean
  • When setting a variable, what symbol goes between the variable name and variable value?
    =
  • When defining a function, what comes after the function keyword?
    function name
  • What's the data type?
    Boolean
  • Which keyword is used to create new variables?
    let
  • Which attribute will run JavaScript code when an HTML button is pressed?
    onclick
  • What will be displayed when this code runs?
    141
  • What's the data type of the nickname variable??
    String
  • What message will be displayed when this code runs?
    You are a minor
  • What's the data type?
    Number
  • What's the data type?
    String
  • In a function definition, the code between the { and } is called...
    the body (of the function)
  • Which HTML element can include JavaScript code on a webpage?
    <script>