daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Feb 14th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Parse file extension
  2.  
  3. ```
  4. let file = 'hello.world.jpg'
  5. let result = file.substring(file.lastIndexOf('.') + 1);
  6.  
  7. console.log(result) // jpg
  8. ```
RAW Paste Data
Top