02-文件扩展名
作用:提取文件名中的扩展名
答案:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<script>
const _getExFilename = (filename) => {
// 补全代码
let fileNameArr = filename.split(".");
return "."+fileNameArr[fileNameArr.length-1]
}
</script>
</body>
</html>