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.
- Create a new repository under your GitHub account using this one as a template.
- Clone your repository down to your local machine and open it with VS Code.
- Live serve index.html and open the browser console.
In index.js, write JavaScript according to the following steps. Make sure the JS file is connected to the HTML file!
- Declare a variable named code1.
- In a separate statement, assign code1 to an expression that evaluates to 10. Use the numbers 7 and 3 and an arithmetic operator.
- 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.
- Create another variable named code3 with a value of 39. The 39 should be calculated using at least one remainder operator.
- Initialize a variable named message to have the value "The vault has been secured. The combination is:.
- 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.
- 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.
- Use console.log to print message, codeA, and codeB to the browser console.
Please submit the link to your public GitHub repository.