Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

Describe discrimination and harassment in the workplace.

Answered: 1 week ago