Tag: slice

Recent Post

How to Get the File Extension from a Filename String

You can combine lastIndexOf() and slice() to get the file extension.

How to remove the last character from a string in JavaScript

Use the negative indexing of the slice method to remove the last character from a string.