Click here to Skip to main content
15,911,891 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can i add space between each letter with lambda.

What I have tried:

I have tried this but without lambda, how can i do it with lambda?

var text = "JavaScript";
text = text.split("").join(" ");
console.log(text);
Posted
Updated 24-Jul-18 20:14pm
Comments
ZurdoDev 23-Jul-18 13:36pm    
If you have code that works, why are you looking for something else? Also, where are you stuck?
Suren97 23-Jul-18 13:37pm    
It is a homework bro, i need to write it with lambda
ZurdoDev 23-Jul-18 13:48pm    
And where are you stuck?
Suren97 23-Jul-18 13:52pm    
in second line. I'm trying like this` text = text.?(a => a.split("").join(" "));what should i write instead of question mark?

1 solution

var text = "JavaScript";
text = text.split("").join(" ");
 
Share this answer
 
Comments
Richard Deeming 25-Jul-18 10:15am    
Reposting part of the code from the question is not a solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900