waterproofbob
Junior Administrator
I would've posted it in the shoutbox but I didn't want our resident hater to miss out.
That's for you D
That's for you D
Ahey,
I actually use that quote all the time.
I don't quite understand the people that think Java "saved the world of computer programming" (of which, there are quite a few, trust me).
I think Java is evil and must be destroyed.
Cheers,
J.
Yes. And I like javascript!Java and Javascript are two very different things...
Java and Javascript are two very different things...
I actually use that quote all the time, only I use it about Java itself.
I don't quite understand the people that think Java "saved the world of computer programming" (of which, there are quite a few, trust me).
I think Java is evil and must be destroyed.
<html>
<head>
<title>Test</title>
</head>
<body>
<dl>
<dt>Answer 1:</dt>
<dd>
<script language="JavaScript">
document.write("1" + 2 + 3);
</script>
</dd>
<dt>Answer 2:</dt>
<dd>
<script language="JavaScript">
document.write(1 + 2 + "3");
</script>
</dd>
</dl>
</body>
</html>
Answer 1:
123
Answer 2:
33
Seriously nanor?What effect does speech marks have?
HTML:<html> <head> <title>Test</title> </head> <body> <dl> <dt>Answer 1:</dt> <dd> <script language="JavaScript"> document.write("1" + 2 + 3); </script> </dd> <dt>Answer 2:</dt> <dd> <script language="JavaScript"> document.write(1 + 2 + "3"); </script> </dd> </dl> </body> </html>
... gives results:
Code:Answer 1: 123 Answer 2: 33
The correct answer *should* be "type mismatch"
They would be treated as numbers. "4" * 1 + 5; will give you 9I wonder what would happen with the multiplication operator? Not interesting enough to experiment with, though...
They do make sense. And it's a lot more straightforward than having to cast everything when I want to output a string...