usmanjunaid59 usmanjunaid59
  • 17-05-2021
  • Computers and Technology
contestada

Q4. Write down the JavaScript statements to perform the following tasks.
i. Accept the value of base, height and length.
ii. Declare three variables base, height and length.​

Respuesta :

sandlee09
sandlee09 sandlee09
  • 22-05-2021

Answer:

Explanation:

In Javascript, you can accept an input value by using the prompt() function and saving the input into a variable. In the following lines of code, I have declared the three variables at the beginning and then prompted the user to enter a value for each and saved the values in the correct variables. In Javascript length is a keyword so I used len instead.

let base, height, len;

base = prompt("Enter Base value: ");

height = prompt("Enter Height value: ");

len = prompt("Enter Length value: ");

Answer Link

Otras preguntas

can 1/5 be simplified.
how does moss adapt to the tropical rain forest
I am a polygon in which all sides are congruent and all angles are congruent
Which statement about Mecca is accurate? Islamic law is decided in Mecca. Mecca was the city where Allah lived. Only Islamic followers ever traveled to Mecca. M
six sisters share 4 sandwiches equally. How much would each get?
which one of the following clue words indicates chronological order? A-next b-reason c- Also d-similar
what does euphoria mean?
Which words make up the adverb phrase in this sentence? Before the weekend, we must finish our project. A. Before the weekend B. our project C. we must D. must
Thomas's coach tells him to run 600 yards after practice. How many feet should Thomas Run ?
The various departments within the government must make predictions about financial needs for the coming year. True or false