GUVI
Back

trim()func is not supporting

Created 3 years ago
32 Views
1 Comments
MMYugesh
@MMYugesh
MMYugesh
@MMYugeshProfile is locked. Login

let str="";

for(i=0;i<userInput.length;i++)

{

let dummy=userInput[i].split("");

for(j=0;j<dummy.length;j++)

{ str=str+(dummy[j])+",";

}

console.log(str.trim());

} i need to get output as g,u,v,i but i am getting as g,u,v,i, not able to cut the last comma!!

Comments
Please login to comment.
 
Powered by habitate.io Habitate