2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by rotten69
0

Hi
split(separator, limit) - Separates a string into an array of strings based on a separator sent as a parameter to the method. Limit is optional (an integer that specifies the number of splits). Like explode() in PHP.
Example:

<script type="text/javascript"><!--
var str="How are you?";
var ar_str = str.split(" ");
alert(ar_str[1]);           // are
//-->
</script>
0

I got that before but then I was not too sure how to access the value. that is great. Thank you.

How about If I want to loop through, for example, a Math class to see what methods are available in it?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.