Edit Game
Web 103 Mid-Semester Review
 Delete

Use commas to add multiple tags

 Private  Unlisted  Public



 Save

Delimiter between question and answer:

Tips:

  • No column headers.
  • Each line maps to a question.
  • If the delimiter is used in a question, the question should be surrounded by double quotes: "My, question","My, answer"
  • The first answer in the multiple choice question must be the correct answer.






 Save   22  Close
How could you set the age of this character to be 9?
character.age = 9;
In the names array, "Jimothy" is at which index?
2
Which JavaScript function can hookup an event listener to an HTML element?
addEventListener
Which HTML element can add a picture to a webpage?
<img>
Write code to map this array of objects into an array of prices, each discounted 50%
items.map(i => i.price/2)
Write code to filter this array so that it only includes family members who are less than 18 years old.
family.filter(m => m.age < 18)
What will be alerted when this code runs?
7
What will be alerted when this code runs?
Timmy is an average kid
What will be alerted when this code runs?
110
What will be alerted when this code runs?
5
Convert this function into an arrow function
x => x+1
Convert this function into an arrow function
() => 5
Which two symbols create an "arrow" for function definitions in JavaScript?
=> (equals sign, greater-than sign)
True or False: when defining a function, a name is always required
False
True or False: In JavaScript, functions can be stored in variables
True
How many statements go between the parentheses in a for loop?
3
The part of a function within curly brackets is called...
the body
What is the first keyword needed to create a for loop?
for
Which function will create a new HTML element in JavaScript?
document.createElement
Which function will grab a full HTML element in JavaScript?
document.querySelector
When this code runs, what message will appear?
"I am 7 years old!"
Which keyword is used to create variables?
let