Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 1a Write a JavaScript to do the following: 1. Prompt the user (see note below) to ask for a single digit number You can

image text in transcribed
image text in transcribed
Assignment 1a Write a JavaScript to do the following: 1. Prompt the user (see note below) to ask for a single digit number You can assume the user will enter a valid value 2. Write a for loop that will iterate from 1 to 100. 3. For each iteration, check to see if the current number is divisible by the number given by the user. 4. If it is, display the number to the console. Sample Output: User enters 6 6 12 18 24 96 Note: You can prompt the user for a number using the following code: let numNumber promptl'Enter a number')); TAX Payment Syst... Canada Visa Inform.. TRACK YOUR APPLL QN 6 12 18 24 96 Note: You can prompt the user for a number using the following code: let nun = Number(prompt('Enter a number')); The prompt() function will ask the user for input. It will return a string. The Number() function will convert the response to a number. It is a good idea to convert values to the type you want rather than counting on JavaScript to do it correctly. Submission: Do not use the var keyword. Instead use let or const Do not include any HTML tags Do not use document.write Save your code to a file called asia.js Submit the is file, do not zip it

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 Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

Students also viewed these Databases questions