I know the split() method splits a string into an array of substrings. But what does the parameter inside this split method do in this code?? split(/\s+/)
It's a regular expression that splits the string with \s matching single whitespace characters and \s+ matching one or more whitespace characters.
Thank you kind Sir for your explanation...
nice
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I know the split() method splits a string into an array of substrings. But what does the parameter inside this split method do in this code?? split(/\s+/)
It's a regular expression that splits the string with \s matching single whitespace characters and \s+ matching one or more whitespace characters.
Thank you kind Sir for your explanation...
nice