Write the code to display an image element with a source set to pup.png.
<img src="pup.png">
This symbol is used to "call" jQuery.
The dollar symbol ($)
This is the keyword to declare a variable.
var
The name of this function:
function addToJeopardyScore() { }
addToJeopardyScore
What is it called when you make a copy of a repository to your account on GitHub?
Fork
What does this tag do?
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
It links to an external CSS file
jQuery is a _______ of Javascript.
What is a library
This is the vocabulary used when you add two strings together to combine them.
concatenate
This is how you would access the 2nd element of an array with the name of arr.
arr[1];
What is command generally comes next in the sequence?
git status
git add .
_______
git commit -m "your message"
#container, .item and h1 are all examples of this
selectors
Using jQuery, write the code to change all elements of class "red" to have a background color of red.
$(".red").css("background-color", "red");
The arguments used when calling this function:
add(5, 7);
5, 7
What is the data type of: 132?
Number
Write a conditional statement that alerts "Success!" if someones writes "password" in an input box.
var userInput = $("input").val();
if(userInput==="password"){
alert("Success!");
}
Write the CSS that would apply flexbox to the following HTML.
<div class="outside">
<div class="inside"> about</div>
<div class="inside"> for schools</div>
<div class="inside"> for companies</div>
<div class="inside"> volunteer</div>
<div class="inside"> donate</div>
</div>
.outside {
display: flex;
}
Based on the code:
$("#run").click(function(){
$("#emoji").hide();
});
What will happen when the element with the id "#run" is clicked. (Be Specific)
The element with the id of emoji will be hidden.
Given the following API request what are the parameters?
api.myawesomeapi.com/v1/items?q=awesomething&awesomenessLevel=6&size=large
q
awesomenessLevel
size
Write it! Create a function named average with the parameters of x and y. Have that function return the average of those two parameters.
function average(x,y){
var avg=(x+y)/2
return avg
}
This founder of Amazon is the wealthiest person in contemporary history.
Who is Jeff Bezos?
Write it! Give the following div a solid, red, 5-pixel border
<div id="danger">Caution</div>
#danger{
border:5px solid red;
}
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();
});
Given the below object, write the code to retrieve the price of the shirt.
var store = {
items: {
shirt: {
price: 10
}
}
}
store.items.shirt.price
Write it! Write a forEach Loop iterates over the array and logs each item to the console doubled.
var array = [1, 2, 3, 4];
=> 2
4
6
8
array.forEach(function(item){
console.log(item * 2);
});
This South African born Canadian-American is the founder of SpaceX, Tesla, and Neuralink.
Who is Elon Musk?