Topics: Create a Variable: let , Create a Variable: const , Mathematical Assignment Operators , The Increment and Decrement Operator , String Concatenation with Variables , String Interpolation , typeof operator , Review Variables
- Create a html file with your name like john.html
- Add current code to that file:
<!DOCTYPE html>
<html>
<body>
<script>
// your code here
</script>
</body>
</html>
- For a 4 years college degree, define two variables:
- Annual cost: $35000
- Inflation rate: %5
All variables are number.
- Calculate the Total Cost for a 4 years college degree and log it into console like this:
For a 4 years college degree with annual cost: ${annualCost} and inflation rate: ${inflationRate}, you have to pay ${totalCost}.
- Imagine you have 5 years to save money for college. How much do you need to save annually to afford the college cost? Log the result into console like this:
You need to save ${annualSaving} annually for ${yearsUntilCollege} years.
Send Pull Request. Check how to deliver your code: https://codingwithbasir.com/how-to-deliver-projects/
Download Learn JavaScript eBook from https://codingwithbasir.com/learn-javascript