Question
1. Create a helloWorld.html with an externalhelloWorld.js script that meets the following requirements: Create a variable with the value Hello, World! Display variable using the
1. Create a helloWorld.html with an externalhelloWorld.js script that meets the following requirements:
Create a variable with the value "Hello, World!"
Display variable using the alert() function
Output variable using the Console.log() function
Tip: Read Section External Scripts - http://javascript.info/hello-world
2. FizzBuzz
Submit js file with functioning code
Write a program that usesconsole.logto print all the numbers from 1 to 120, with two exceptions. For numbers divisible by 4, print"Fizz"instead of the number, and for numbers divisible by 10 (and not 4), print"Buzz"instead.
When you have that working, modify your program to print"FizzBuzz", for numbers that are divisible by both 4 and 10 (and still print"Fizz"or"Buzz" for numbers divisible by only one of those).
Tip: This is a looping job while() : remainder (%) operator for checking whether a number is divisible by another number (has a remainder of zero) there are three possible outcomes for every number, so youll have to create an if/else if/else chain of tests.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started