"Error in use of Bolean type of Javascript."
Syntax error is coming in document.write(true*5+false*7=) in the following program:
1-
2-
3-
4-document.write("true*5+false*7=")
5-document.write(true*5+false*7=)
6-
7-
What's wrong in the 5th line document.write(true*5+false*7=) of this program?
Thanks in advance.

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Feb 23, 2011, 4:58 AM EST
Hi,
in this --- document.write("true*5+false*7=") --- You are printing the string.
Where as --- document.write (true*5+false*7=) -- here you are trying to multiply the integer value with Boolean value. So programmatically it's not possible to multiple like this.
Syed Arbab Ahmed88 reputationPosted Feb 24, 2011, 1:07 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Feb 24, 2011, 1:21 AM EST
Syed Arbab Ahmed88 reputationPosted Feb 24, 2011, 7:51 PM EST
Does document.write(2*5+2*7=) means it should get multiplied like 10+14=24, but it's not happening as well.
Suthish NairRank #92 · 22.8K reputationPosted Feb 25, 2011, 12:10 AM EST