HTML and CSS
jQuery
Variables and Math Functions
Functions and Conditionals
Arrays and Loops
100

Fix it! This should be an anchor tag with an id of clickme, that links to https://scripted.org/:

 ScriptEd

<a href="https://scripted.org/" id="clickme">ScriptEd</a>

100

jQuery is a _______ of Javascript.

What is a library?

100

What is the data type of: 132?

Number (Integer)

100

The name of this function:

function addToJeopardyScore(points) {...}

addToJeopardyScore

100

True or false? All of the following data types can be included in an array: string, boolean, number.

True

200

Write it! Using correct indentation, create a container with the class of "container". In this container create an unordered list of ice cream flavors: vanilla, chocolate, and strawberry.

The answer's indentation may not be displayed correctly due to the Jeopardy platform.

<div class="container">

  <ul>

    <li>vanilla</li>

    <li>chocolate</li>

    <li>strawberry</li>

  </ul>

</div>

200

The following line of code does this: $(".intro").

What is select all elements with the class intro?

200

What is the value of z?

var x=5;

var y=7;

var z =x+y;

x=10;

z=12;

200

The arguments used when calling this function:

add(5, 7);

5, 7

200

This is how you would access the 2nd element of an array with the name of arr.

arr[1]

300

Write it! Use CSS to change this element's text to brown.

<p id="sentence">The quick brown fox</p>

#sentence {

     color: brown;

}

300

Write it! Write the jQuery code to change all elements of class "red" to have the background color of red.

$(".red").css("background-color", "red");

300

The code below should print a random number to the console when a button is clicked. Find the error.

$("button").click(function(){

    var randomNum = math.random();

    console.log(randomNum);

});

$("button").click(function(){

    var randomNum = Math.random();

    console.log(randomNum);

});

300

What will this function return, assuming that it adds the two arguments together?

add(add(12, 4), 5);

21

300

Find the error in the following code.

var alph=["a","b","c"];

alph.forEach(letter){

 console.log(letter); 

});

var alph=["a","b","c"];

alph.forEach(function (letter){

 console.log(letter);   

});

400

Write it! Give the following div a solid, red, 5-pixel border 

<div class="danger">Caution</div>

.danger{

 border:5px solid red;   

}

400

Based on the code: 

$("#run").click(function(){

     $("#emoji").hide();

});

What will happen when the any element with the id "#run" is clicked. (Be Specific)

The elements with the id of emoji will be hidden.

400

You'd like to print a new random number to the console every time a button is clicked. Find the error in the code.

var random = Math.random();

$("button").click(function(){

    console.log(random);

});

$("button").click(function(){

    var random=Math.random();

    console.log(random);

});

400

Find the error.

var x=7;

if(x=5){

     console.log(true);

}else if(x>5){

    console.log(false);

}else{

    console.log(false);

}

var x=7;

if(x===5){

    console.log(true);

}else if(x>5){

    console.log(false);

}else{

    console.log(false);

}

400

How would you change the following code so the greeting "Hi, " is added before each array element?

var names = ["Michael","Peter","Naomi"];

names.forEach(function(name){

     console.log(name);

});

var names = ["Michael","Peter","Naomi"];

names.forEach(function(name){

     console.log("Hi, "+ name);

});

500

This question's indentation may not be displayed correctly due to the Jeopardy platform.

Write it! Apply flexbox to the navbar.

<div id="nav">

     <div>Home</div>

     <div>About</div>

     <div>More</div>

</div>

#nav{

      display:flex;

}

500

Write it! Write the code that would retrieve the value of something typed in an input box with the id of username when a button with an id of "submit" is clicked.

$("#submit").click(function(){

     $("#username").val();

});

500

Write it! Write the code that will print a random number between 0 and 3 to the console when a button is clicked.

$("button").click(function(){

    var random=Math.random();

    console.log(random*3);

});

500

Write it! Write a conditional statement that alerts "Success!" if someones types "password" in an input box.

var userInput = $("input").val();

if(userInput==="password"){

     alert("Success!");

}

500

Write it! Write the code that will loop through the following array and print each element.

var flavors= ["chocolate","vanilla","strawberry"];

var flavors= ["chocolate","vanilla","strawberry"];

flavors.forEach(function(flavor){

    console.log(flavor);

});

M
e
n
u