Skip to content

Instantly share code, notes, and snippets.

@crutchcorn
Created November 22, 2021 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crutchcorn/847af6f7f6cb7d29cbfa9d52c35fd509 to your computer and use it in GitHub Desktop.
Save crutchcorn/847af6f7f6cb7d29cbfa9d52c35fd509 to your computer and use it in GitHub Desktop.
str = 'a/b/c/d/e/f'
p = []
toCount = str.length;
for (let n = 0; n < toCount; n++) {
if (str[0] !== '/') {
p.push(str[0]);
}
str = str.slice(1, str.length);
}
// LOL Thanks for the nerd snipe @PixelPirate17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment