Answered
In VB's Left("text", 3) show the left 3 characters of the text. Does Javascript have anything equivalent?
Troy
In VB's Left("text", 3) show the left 3 characters of the text. Does Javascript have anything equivalent?
Troy
function Left(sString, fLength) {// returns the left most flength characters of the sStringreturn sString.substr(0, fLength);}
var sMyString = "AbCdEfGh";var fChars = 3;var sLeft3 = Left(sMyString, fChars);console.show();console.clear();console.println("Left " + fChars + " characaters of \"" + sMyString + "\" are: " + sLeft3);
Example:
Produces:
George Kaiser