Name it: index.html and place it in the root of your project directory
Name it: script.js and place it in res/js/ directory
Add script.css to index.html by adding this tag to bottom of the page before </body>:
<script type="text/javascript" src="res/js/script.js"></script>
const EVERY_DAY_SPENDING = 15.3
let userName = "Andy"
let userAge = 45
let userBalance = 1200
let userIsAlive = true
let userPets = ["Cat", "Dog"]
let everyDaySpendingPerPet = 6
console.log("User Name", userName)
console.log("User Age", userAge)
console.log("User Balance", userBalance)
console.log("User Is Alive", userIsAlive)
console.log("User Pets", userPets)
userName = "Andrew"
userAge = 46
userBalance += 15.7;
// userPets.push("Hamster")
// everyDaySpendingPerPet += 7.1
// userPets.pop()
// userPets.pop()
// everyDaySpendingPerPet = 2.4
let daysSurvived = 0
while (userBalance > 0) {
let spending = EVERY_DAY_SPENDING + everyDaySpendingPerPet * userPets.length
userBalance -= spending
daysSurvived++
}
userIsAlive = false
console.log("User survived for " + daysSurvived + " days, RIP")
Write a program that prints the numbers from 1 to 1000. But for multiples of 3 print "Fizz" instead of the number and for the multiples of 5 print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Otherwise print the number itself
Write fibonacci sequence for first 100 numbers. The Fibonacci Sequence is the series of numbers:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...
The next number is found by adding up the two numbers before it. Start with the array of [0, 1]
Write the list of prime numbers between 1 and 200. Prime numbers are numbers that have only 2 factors: 1 and themselves. For example, the first 5 prime numbers are
2, 3, 5, 7, and 11