Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Left funtion


Message #1 by PERRETTA Franco <Franco.PERRETTA@c...> on Tue, 30 Jan 2001 14:36:25 +0100
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

  Return to Index