Created
April 9, 2014 06:10
-
-
Save hankyates/10230737 to your computer and use it in GitHub Desktop.
Javascript implementation of a string delimiter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write a function that takes in a string seperated by a seperator, and will return an array | |
// of strings in between the seperators. | |
var sampleInput = 'asdf$lskd1234$asdo'; | |
stringDelemiter(sampleInput, '$'); | |
// -> ['asdf', 'lskd1234', 'asdo'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typo:
stringDelemiter(sampleInput, '$');
should be
stringDelimiter(sampleInput, '$');