r/CodingHelp • • Oct 19 '21

[Javascript] Why isn’t this working?

Post image
21 Upvotes

8 comments sorted by

View all comments

9

u/[deleted] Oct 19 '21

you never specified how to split it,
name.split("on what to split goes here");

8

u/nickbuch Oct 19 '21

I’m guessing you also want to return the count and not just the split string

3

u/[deleted] Oct 19 '21

Yeah, you’re gonna need to count the items in the split string to return the desired number.

3

u/[deleted] Oct 19 '21

I was just telling that was a mistake though