Exercise 7 · Chapter: String ManipulationRequired+50 XP
File Extension Checker
Read a filename. If it ends with .js, print JavaScript file. If it ends with .txt, print Text file. Otherwise, print Unknown file type.
Example:
Input:
script.js
Output:
JavaScript file
Need a hint?
3 available · costs 5 XP each
javascript
Output
Run your code to see the output here.