Skip to content

cs-fullstack-master/javascript-concept-review-level-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

JavaScript Review 3 - Functions and Loops

This 5 challenge review covers core JavaScript concepts and is expected to take Students 1.5 hr or less

Directions

  • Create a new public GitHub repository called javascript-concept-review-level-3
  • Clone repository and copy the contents of this README file to your README
  • Create index.html,style.css, and main.js files in your project
  • Code your answers to each of the 5 questions using the Standard JavaScript Template described below:

NOTE: Start with a separate JavaScript file with a function called main(). This should be the first function called and point of entry for execution. All other code to accomplish whatever challenge should be in it's own function called from the main() function. No JavaScript code should execute outside of a function. This pattern should be considered our 'Standard JavaScript Template' for all exercises.

main() {
    // call exercise1()
    // call excercise2()
    // etc.
}

Before you type ANY CODE, write out your steps to solve each exercise in each file. Use single line comments to pseudocode what you need to do to solve the problem then fill in the blanks.

// JUST AN EXAMPLE!
// Create an array
// Load objects into the array
// Iterate through each element in the array and print the element

1. Input and Loops

Create two variables called five assigned 5 and eight assigned 8. Next create an if statement compairing five is less than eight. If it's true, , print “5 is less than 8”. Else, print ERROR in the console or browser..

2. Input and Loops

Print all even numbers from a user's given start and stop number in the console or browser.

3. Input and Loops

Ask the user to create two variables. Create a function that takes two variables and returns the largest of the two numbers in the console or browser.

4. Input and Loops

Create a program that takes user input. If they enter 1, call a function that prints 1. If they press 2, call a function that prints 2. If they press 3, call a function that prints 3. If they enter q, quit. Else, print ERROR in the console or browser.

5. Input and Loops

Ask the user to enter a starting balance for their bank account. Ask the user if they want to make a withdraw or deposit. Ask them for the amount to withdraw or deposit, then show the the new balance in the console or browser. Let the user quit when they enter q.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published