Is there a limit on the number of lines a javascript file can have?
10 121 /8
Since 10 121 is the maximum number of bits in a universe and you would presumably make an 8-bit encoding of your javascript, even if the entire universe were filled with nothing more than your empty javascript file, it could have no more than 11.25e120 lines.
TL DR There are no restrictions.
Nothing official, but the larger the file, the more the browser must download, analyze and execute.
, javascript , javascript. ( , , ..).
, javascript, , , javascript, , .
, , , . , , , .
: -)
- , , , Javascript. Javascript .
...
If you have tens of thousands of lines of code, you can evaluate your design and reorganize it a lot, as this may be a sign of poorly designed code.
Actually there is, if you work in IE, you will find that a program that runs on more than 5,000,000 lines. IE thinks it might be stuck in an infinite loop, and a popup will prompt the user to either kill the script or continue ...