How to Extract a File Extension from a Filename in JavaScript | CodeTrail