使用 JS 实现获取文件扩展名?

184 阅读1分钟

let suffix = fileNames.substring(fileNames.lastIndexOf(".")); let suffix = fileNames.slice(((fileNames.lastIndexOf(".") - 1) >>> 0) + 2);