On Sun, Jan 16, 2011 at 4:04 PM, [email protected] <[email protected]> wrote:
> function helloWorld()
> {
> return 'line1' + "\n" + 'line2';
> }
>
> helloWorld();
> helloWorld();
>
> ignore the second HelloWorld function call?? output is only "line1
> line2" and not "line1 line2 line1 line2".
>
How are you running the script? The script, as shown above, doesn't output
anything. It just calculates the string values and returns them. If you're
using the demo shell, it shows you (if i recall correctly?) the value of the
last-evaluated expression, which is "line1\nline2".
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users