The Math Object | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

The Math Object

Hi Everyone! I have a little program: var logorithm = Math.log10(prompt ("Enter your number..")); document.write ("log10 ( " + user entered number + " )=" + logorithm); In this program I want to print user's entered number like this: log10 (100) = 2; Can anyone help me!?!? https://code.sololearn.com/WA50ZXMeMN15/?ref=app

8th Nov 2018, 2:01 PM
Maksat Orazsahedow
Maksat Orazsahedow - avatar
4 Answers
+ 8
Hi Maksat Orazsahedow, To accomplish that, you need to use ` Instead of " To fix your issue, get rid of the inner double quotes and replace the outer double quotes with the ` sign.(Do not know the name of that sign, excuse me) To call a variable element you need to use ${logorithm} inside the ` ` signs. Have a look at the changes, hope it helps👍 https://code.sololearn.com/WTR307PKpvE7/?ref=app
8th Nov 2018, 2:25 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 4
Vincent Berger thanks a lot!
8th Nov 2018, 2:29 PM
Maksat Orazsahedow
Maksat Orazsahedow - avatar
+ 3
You're welcome👍
8th Nov 2018, 2:30 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 1
boljak 👍
10th Nov 2018, 3:35 PM
Annam
Annam - avatar