I am able to get myVariable printed in the p tag as long as it is either a word or a numner. But if i want to print a sentence like this, then it is not getting printed.
What i want to print- Multiplication of 6 and 3 is 318.
THE CODE:
var x=6 ;
var y=3;
var m = x*y ;
var myVariable = (“Multiplication of” , x , “and” , y , “is” , m) ;
document.getElementById(“demo”).innerHTML = myVariable ;
But, this code is only printing 18 which is the m variable instead of printing the entire sentence.