Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

use of split and join

/* split methods splits string object into array of strings  
and join method changes element of array into a string */
const name= "Shirshak Kandel"
const nameWithDash=name.split(" ").join("-")
console.log(nameWithDash);//Shirshak-kandel
Comment

PREVIOUS NEXT
Code Example
Javascript :: mongoose updatemany example 
Javascript :: how to handle errors with xmlhttprequest 
Javascript :: js how to get max sub array sum 
Javascript :: javascript best way to loop through array 
Javascript :: javascript string() function 
Javascript :: window onload 
Javascript :: where is select value in javascript event object 
Javascript :: JavaScript Element fade out 
Javascript :: fibonacci numbers 
Javascript :: Iterate with Do While Loops Javascript 
Javascript :: javascript regex grouping replace 
Javascript :: name first letter uppercase 
Javascript :: how to clone an object in javascript 
Javascript :: react merge two objects 
Javascript :: byte to integer js 
Javascript :: array mdn map 
Javascript :: javascript boolean 
Javascript :: node localstorage 
Javascript :: mdn object assign 
Javascript :: javascript shift 
Javascript :: how to run the sonar scanner 
Javascript :: ENOENT, no such file or directory 
Javascript :: permutation and combination program in javascript 
Javascript :: js get children 
Javascript :: Check if instance is array 
Javascript :: node js express session expiration 
Javascript :: react native material bottom tabs 
Javascript :: Setting darkmode using Tailwind 
Javascript :: input show validation message 
Javascript :: react-native-safe-area-context 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =