Basic JavaScript - Multiply Two Decimals with JavaScript

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

const product = 2.0 * 5.0;
var product = 2.0 * 5.0 ;
5.0

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Multiply Two Decimals with JavaScript

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Welcome to the forum @ntokozo.tshepo

Your code will throw an error because a variable can only be declared once.

Here is the original code.

const product = 8 * 0;

The instructions want the product variable to equal 80.
At the moment it equals zero.

Change zero so that the product equals the desired amount.
So you have to work out what eighty divided by 8 equals.

Replace zero with that number.

Basically the step is showing you to multiple two numbers and store that value in a variable using JavaScript.

Please reset the step to restore the original code and try again.
No need to declare any variables, just change one number.

Happy coding

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.