Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Program to illustrate split() function

// JavaScript Program to illustrate split() function

const text = "Welcome to JavaScript Tutorial - ItsJavaScript";

// split the text with space
let result = text.split(" ");
console.log(result);

// Output: [ 'Welcome', 'to', 'JavaScript', 'Tutorial', '-', 'ItsJavaScript' ]
Source by itsjavascript.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Program #illustrate #function
ADD COMMENT
Topic
Name
6+4 =