const fileType = url.substr(1 + url.lastIndexOf("/")).split('?')[0]).split('&')[0].substr(url.lastIndexOf("."));
The code above returns either [.exe] or [.pdf]
I need to modify the code so it only returns [EXE] or [PDF]. What adjustments should be made to achieve this?