Toggle Navigation
Games
Blog
Class PIN
Join for Free
Sign in
Toggle Navigation
Games
PIN
Join for Free
Blog
Pricing
Contact us
Help center
Sign in
Study
Web 103 Mid-Semester Review
0
%
0
0
0
Back
Restart
Which two symbols create an "arrow" for function definitions in JavaScript?
=> (equals sign, greater-than sign)
Oops!
Okay!
What is the first keyword needed to create a for loop?
for
Oops!
Okay!
True or False: when defining a function, a name is always required
False
Oops!
Okay!
When this code runs, what message will appear?
"I am 7 years old!"
Oops!
Okay!
What will be alerted when this code runs?
Timmy is an average kid
Oops!
Okay!
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)
Oops!
Okay!
What will be alerted when this code runs?
110
Oops!
Okay!
Which function will grab a full HTML element in JavaScript?
document.querySelector
Oops!
Okay!
What will be alerted when this code runs?
5
Oops!
Okay!
True or False: In JavaScript, functions can be stored in variables
True
Oops!
Okay!
In the names array, "Jimothy" is at which index?
2
Oops!
Okay!
Which HTML element can add a picture to a webpage?
<img>
Oops!
Okay!
How could you set the age of this character to be 9?
character.age = 9;
Oops!
Okay!
Convert this function into an arrow function
x => x+1
Oops!
Okay!
Which JavaScript function can hookup an event listener to an HTML element?
addEventListener
Oops!
Okay!
Which keyword is used to create variables?
let
Oops!
Okay!
What will be alerted when this code runs?
7
Oops!
Okay!
How many statements go between the parentheses in a for loop?
3
Oops!
Okay!
The part of a function within curly brackets is called...
the body
Oops!
Okay!
Write code to map this array of objects into an array of prices, each discounted 50%
items.map(i => i.price/2)
Oops!
Okay!
Which function will create a new HTML element in JavaScript?
document.createElement
Oops!
Okay!
Convert this function into an arrow function
() => 5
Oops!
Okay!
Your experience on this site will be improved by allowing cookies.
Allow cookies