var filename = 'myFile.jpg';
var ext = filename.split('.').pop(); //We split the filename on every instance where the . is found and then getting the last element in the array using the pop() function
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.