You can do it this way:
MyVar =3D "Toronto".slice(0,3)
Or (preferred) declare a reference to the string object:
var MyVar =3D new String("Toronto").slice(0,3)
Lookup the slice method of the String Object to find out all the
details.
Just goto http://google and type in "string object slice". There's a
wealth
of information out there!
-----Original Message-----
From: PERRETTA Franco [mailto:Franco.PERRETTA@c...]
Sent: Tuesday, January 30, 2001 8:36 AM
To: javascript
Subject: [javascript] Left funtion
Dears,
In VB Script the LEFT funcion works in this way:
---------------------------
MyVar=3DLeft(=93Toronto=94,3)
MyVar will be =94Tor=94
---------------------
What is the same syntax in Java Script?
Thank you very much
Franco