"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.
Suthish NairPosted Feb 25, 2011, 5:10 AM
Syed Arbab AhmedPosted Feb 25, 2011, 12:51 AM
Does document.write(2*5+2*7=) means it should get multiplied like 10+14=24, but it's not happening as well.
Suthish NairPosted Feb 24, 2011, 6:21 AM
Syed Arbab AhmedPosted Feb 24, 2011, 6:07 AM
Jaganathan BantheswaranPosted Feb 23, 2011, 9:58 AM
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.