Q:

Write a JavaScript exercise to get the extension of a filename

0

Write a JavaScript exercise to get the extension of a filename.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

filename = "system.php"
console.log(filename.split('.').pop());
filename = "abc.js"
console.log(filename.split('.').pop());

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now