The Math Object | Sololearn: Learn to code for FREE!


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!?!?

11/8/2018 2:01:01 PM

Maksat Orazsahedow

5 Answers

New Answer


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👍


Vincent Berger thanks a lot!


You're welcome👍


boljak 👍