Tokenize a string: Difference between revisions

Content deleted Content added
No edit summary
Line 1:
{{task}}
Separate the string "Hello,How,Are,You,Today" by commas into an array so that each index of the array stores a different word. Display the words to the 'user', in the simplest manner possible, separated by a period. To simplify, you may display a trailing period.
 
==[[JavaScript]]==
[[Category:JavaScript]]
'''Interpreter:''' Firefox 2.0
 
var str = "Hello,How,Are,You,Today";
var tokens = str.split(",");
alert( tokens.join(".") );
 
==[[Perl]]==