If I have an external javascript and declare it in html, but this file does not have a .js extension knowing that it has scripts in it, would it be the same as the file that contains extension .js, in relation to performance?
If I have an external javascript and declare it in html, but this file does not have a .js extension knowing that it has scripts in it, would it be the same as the file that contains extension .js, in relation to performance?
Does not affect, the performance is based on the amount of code that the site loads to process, if you want to increase the performance, you minify the file, taking it to a few lines of code (ideal in only one), eliminating spaces and comments, define or not an extension, would not bring increased performance, which could cause you is a problem, for example at the time of editing the IDE does not recognize the type of file and would not help for example with the auto completed code.
All files have an extension. Maybe you do not see it because you use windows and windows by default it hides the extensions but you can see it by right clicking the file and in properties see the extension of the file (js, html, css, etc)