Skip to content

galkevin24/Securethevault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Secure the Vault

You have been hired to secure a vault! You must ensure that the client's family heirlooms are stored safely. In this workshop, you will write JavaScript to correctly set the codes for the vault's combination lock.

Getting Started

  1. Create a new repository under your GitHub account using this one as a template.
  2. Clone your repository down to your local machine and open it with VS Code.
  3. Live serve index.html and open the browser console.

Instructions

In index.js, write JavaScript according to the following steps. Make sure the JS file is connected to the HTML file!

  1. Declare a variable named code1.
  2. In a separate statement, assign code1 to an expression that evaluates to 10. Use the numbers 7 and 3 and an arithmetic operator.
  3. In one statement, initialize another variable named code2 to have a value of 40. The 40 must be calculated using three numbers and the subtraction and division operators.
  4. Create another variable named code3 with a value of 39. The 39 should be calculated using at least one modulo operator.
  5. Initialize a variable named message to have the value "The vault has been secured. The combination is:.
  6. Initialize a variable named codeA to have the value "10-40-39". This value must be calculated by concatenating the variables code1, code2, and code3.
  7. Initialize a variable named codeB to have the value "10-40-39". The value must be a single template literal that uses the variables code1, code2, and code3.
  8. Use console.log to print message, codeA, and codeB to the browser console.

Submission

Please submit the link to your public GitHub repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published