Skip to content

Instantly share code, notes, and snippets.

@mornir
Created July 16, 2017 08:56
Show Gist options
  • Save mornir/531096bcf839cbc15e4f142efdbfb65d to your computer and use it in GitHub Desktop.
Save mornir/531096bcf839cbc15e4f142efdbfb65d to your computer and use it in GitHub Desktop.
String parsing using array destructuring
const pathUrl = "c:/alex/mesdocument";
const [server, user, directory] = pathUrl.split("/");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment