Home Tutorialhelp Comment To Trim() JavaScript var

 
 

Comment

Lavanya
To Trim() JavaScript var,
December 2, 2008 at 12:48 AM

<% List videoFileTypes = display.getVideoExtnTypes(); %>

var videoFileTypes = new Array();
videoFileTypes='<%=videoFileTypes%>';
var v1=videoFileTypes.replace("[","");
var v2=v1.replace("]","");
var v4 = v2.replace(/\s+/g,''); //to trim the Array just use this expression.
var v3=v4.split(",");
View All Comments | View Tutorial
Related Tutorial and Articles

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.