Permalink
Browse files

draft exercise

  • Loading branch information...
Zakk Fleischmann
Zakk Fleischmann committed Aug 30, 2018
1 parent 3dc9f60 commit e554bccea05f4db9b43c215a24f36940106dec2f
Showing with 71 additions and 39 deletions.
  1. +9 −39 README.md
  2. +50 −0 lib/challenge.js
  3. +12 −0 lib/index.html
@@ -1,58 +1,28 @@
[![General Assembly Logo](https://camo.githubusercontent.com/1a91b05b8f4d44b5bbfb83abac2b0996d8e26c92/687474703a2f2f692e696d6775722e636f6d2f6b6538555354712e706e67)](https://generalassemb.ly/education/web-development-immersive) [![General Assembly Logo](https://camo.githubusercontent.com/1a91b05b8f4d44b5bbfb83abac2b0996d8e26c92/687474703a2f2f692e696d6775722e636f6d2f6b6538555354712e706e67)](https://generalassemb.ly/education/web-development-immersive)


# Homework Template # Conditionals Practice


Use this template to structure your READMEs for diagnostics. Use this exercise to practice writing conditionals!

Be sure to include a recent [`LICENSE`](LICENSE) and Markdown linter
configuration ([`.remarkrc`](.remarkrc)).


## Prerequisites ## Prerequisites


* Topics with which developers should be familiar with. * JavaScript syntax
* Prerequisites are "just-in-time", so if I have a prerequisite that mentions * Data types
Sass, I would **not** need to include CSS as a prerequisite.
* [Links to previous materials](https://www.youtube.com/watch?v=dQw4w9WgXcQ)
are often useful.
* In a challenge, it is useful to link to reference material, such as talk
repositories.


## Instructions ## Instructions


1. Fork and clone this repository. 1. Fork and clone this repository.
1. Change into the new directory. 1. Change into the new directory.
1. Install dependencies.
1. Fulfill the listed requirements. 1. Fulfill the listed requirements.


Starter code is available in [`lib/challenge.js`](lib/challenge.js). You are Starter code is available in [`lib/challenge.js`](lib/challenge.js). You are not
required to turn in your submission by making a pull request on the original required to turn in your submission.
repository.

Unless otherwise specified on the calendar or by an instructor, homework is due
the next morning by 9:00am.


## Requirements ## Requirements


Describe behavioral requirements as you'll be using them in tests. That is, Open up the `lib/` directory in VS Code and work through the prompts in
list requirements in language that describes how the written code will be used, `challenge.js`. **Make a commit after completing each prompt**
not how it will be written, with the exception of constraints you may wish to
place on implementation. It's a good idea to include the below paragraph
verbatim.

## Bonus

Bonuses are described after the requirements, if included. They should be worked
on **only after** passing requirements.

Less experienced students should be able to complete the base requirements in
the alloted time for labs and in around 2 hours for homework; more experienced
students should be to complete the bonus.

Sometimes, we ask questions that promote thinking critically about code.

## Plagiarism

Take a moment to refamiliarize yourself with the [Plagiarism policy](https://git.generalassemb.ly/DC-WDI/Administrative/blob/master/plagiarism.md). Plagiarized work will not be accepted.


## [License](LICENSE) ## [License](LICENSE)


@@ -0,0 +1,50 @@
/*
* Work through each of the prompts below.
*
* Pro tip: comment out your solution to each prompt before moving on, so your
* console only has messages from the prompt you're currently working on.
*
* Remember to make a commit after completing each prompt
*/

/*
* Prompt:
*
* Create a variable called age and assign it to your age (or a number). Write
* a conditional that matches the following conditions:
*
* - if age is less than or equal 19, print "You're still a teenager!"
*/

/*
* Prompt:
*
* Create a variable called favoriteNumber and assign your favorite number to
* it. Write a conditional that matches the following conditions:
*
* - if favoriteNumber is less than 10, print "A little number!" to the
* console
* - otherwise, print "Not a little number!" to the console
*/

/*
* Prompt:
*
* Create a variable called a and assign it a number. Write a conditional that
* matches the following conditions:
* - if (a * 3) % 2 is equal to 0, print "After running our calculations, the
* result is even"
* - otherwise, print "After running our calculations, the result is odd"
*/

/*
* Prompt:
*
* Create a variable called b and assign it a random number between 0 and 100.
* Write a conditional that matches the following conditions:
*
* - if b is less than 25, print "bottom quartile"
* - if b is between 25 and 50, print "lower quartile"
* - if b is between 50 and 75, print "upper quartile"
* - if b is between 75 and 100, print "top quartile"
*/
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>JS Conditionals Practice</title>
</head>
<body>
<p>Check the console!</p>
<script src="./challenge.js"></script>
</body>
</html>

0 comments on commit e554bcc

Please sign in to comment.