Skip to content

Instantly share code, notes, and snippets.

https://docs.google.com/presentation/d/1EKjyn_pGMNnfmfrHd_7l5bYZLTVoOsdvlP7_SQe6lsI/edit#slide=id.g24c7339d71_0_0

Break the code!

You've been given a box with a secret number lock. If you put the correct numbers in, the secret message will be revealed.

You'll need to write 7 conditional statements to help figure out the correct numbers.

OUTPUT 1:

  • If input1 is equal to 8, set the text of output1 to Y

OUTPUT 2:

07.1 Basic Conditionals

For each of the test questions, use conditionals to check whether the correct answer was provided by the user. The click handlers for each question has been provided for you (except for the last question).

Go through each question, and do the following:

  1. ** English **: Write an if/else conditional statement to check if the value of the variable englishInput is correct (the answer should be Mon).

  2. ** Social Studies **: Write an if/else conditional statement to check if the value of the variable ssInput is correct (the answer should be Albany). If it is correct, use .text() to display a message in the div with the ID ssMessage. (Hint: refer to the code in the previous question)

07.2 Multiple Conditions: ScriptEdGram

Instagram copied Snapchat, so ScriptEd is going to copy Instagram. Help make ScriptEdGram, by creating a conditional statement, using if, else-if, and else.

  1. Follow the green //commented instructions in the JavaScript panel to complete the first challenge
  2. Create a click handler with a conditional for the Bushwick filter
  3. Create click handlers and conditionals for the SOMA and Sunset filters.

Done early?

@font-face {
font-family: badaboom;
src: url(/fonts/badaboom.woff);
}
@font-face {
font-family:kabel;src:url(/fonts/kabel.woff);
}
@font-face {

Pixel Art

You'll create 10 classes, and assign them to the tags as described below. Once you assign a background color to each class, you will reveal the secret picture!

The tags in each item here should have the same class:

  • A-05 through A-09, B-04 through B12
  • C-04 through C-06, D-03, D-05, E-03, E-05, E-06, F-04
  • C-09, D-09
  • E-10, F-09 through F-12
<!DOCTYPE html>
<html>
<head>
<title>Exercises With Arrays And For Loops</title>
</head>
<body>
<h1>Exercises With Arrays And For Loops</h1>
<div id="exercise01" class="exercise">
<h3>Exercise #01</h3>
<div class="answer">
<!DOCTYPE html>
<html>
<head>
<title>Exercises With Arrays And For Loops</title>
</head>
<body>
<h1>Exercises With Arrays And For Loops</h1>
<div id="exercise01" class="exercise">
<h3>Exercise #01</h3>
<div class="answer">
<!DOCTYPE html>
<html>
<head>
<title>Exercises With Arrays And For Loops</title>
</head>
<body>
<div id="exercise01" class="exercise">
<h3>Exercise #01</h3>
<div class="answer">
</div>
<!DOCTYPE html>
<html>
<head>
<title>jQuery Review</title>
</head>
<body>
<div>
Review 1:
<button id="button1">Pop up an alert</button>
</div>