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

Select all of the statements that are true.
Alice has $15 more than Barry. Charlene has 5/9 of the amount of Barrys money. If Alixe has x dollars, how much money do they have altogether.
Republicans split their votes between William Howard Taft and Theodore Roosevelt, and therefore the Democratic candidate, Woodrow Wilson, won the election of 19
where was the the constitutional convention held
In the 19th century, collective bargaining was carried out between what two groups?
Last night, Lucy and Neil met Morey in Gramercy Park. 4. The predicate of the sentence is A. met. B. Lucy and Neil. C. Morey.
which of the following is not a function of peoteins
Define alkanes and give examples
What do "100 Years of JROTC Yesterday, Today, and Tomorrow" means?
50% of cakes baked were party cakes 1/5 were fruit cakes what percentage was sponge