You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							10 lines
						
					
					
						
							648 B
						
					
					
				
			
		
		
	
	
							10 lines
						
					
					
						
							648 B
						
					
					
				| // split(): The split method splits a string at a specified place.
 | |
| let string = '30 Days Of JavaScipt'
 | |
| console.log(string.split())     // ["30 Days Of JavaScript"]
 | |
| console.log(string.split(' '))  // ["30", "Days", "Of", "JavaScript"]
 | |
| let firstName = 'Asabeneh'
 | |
| console.log(firstName.split())  // ["Asabeneh"]
 | |
| console.log(firstName.split(''))  // ["A", "s", "a", "b", "e", "n", "e", "h"]
 | |
| let countries = 'Finland, Sweden, Norway, Denmark, and Iceland'
 | |
| console.log(countries.split(',')) // ["Finland", " Sweden", " Norway", " Denmark", " and Iceland"]
 | |
| console.log(countries.split(', '))   //  ["Finland", "Sweden", "Norway", "Denmark", "and Iceland"]
 |