HTML and CSS
Modern JS
React
Data
Mystery Box
100

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

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

100

Name the two  variable declarations besides var

const and let

100

This is a reusable piece of code in react

What is a component

100

This data structure is a list of values

What is an array

100

var a = "false"


a is what type of data

A string


200

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

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

.danger{

 border:5px solid red;   

}

200
Put this at the top your file to include a js module from another file

import

200

This method inside a react component is responsible for displaying the content on the screen

What is the render method

200

This data structure is a list of key values pairs

What is an object

200

This is the value that this expression evaluates to


(1>2 || 5===5) && (true || false)

true

300

This css selector selects all the <a> elements inside a <p> element

p a {

}


300

This function is used to iterate over an array and return the resulting modified array

what is the map function

300

We use these to pass data from one component to another and allow us to customize components

What are props

300

This is where we persist data for an application

What is a database

300

Write it! Write the code that will print a random number between 1 and 5

var random=Math.random();

console.log((random*4) +1);

400

Name 15 types of html elements (will only accept one type of heading)

h1 a p ul ol li div img marquee br title head body script style i b span section main

400

var myFunction = () => {

  return "hi"

}

is what type of function?

An arrow function

400

This allows us to keep track of data related to a specific component

What is state

400

Write the code to retrieve the value 42 from the object

var myData = {

  one: [

   {

     two: [42]

   }

  ]

}

myData.one[0].two[0]

400

What new city will Code Nation be in 2019

Chicago

500

This element is used to display content from another webpage in your webpage

What is an iframe

500

var name = "Joe"

var title = "manager"

var sentence = `${Joe} is a ${title} at Code Nation"

console.log(sentence

What will the following display?

500

Call a component called "Navbar" and pass it a prop called "title" with the value "My Site"

<Navbar title="My Site">

500

Write it! Write the code that will loop through the following array count how many times chocolate appears

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

var count = 0;

flavors.forEach(function(flavor){

    if(flavor=="chocolate"){

     count++;

   }

});

console.log(count);

500

What NBA basketball player was a judge at the hackathon?

Smush Parker