squishing javascript
squishing javascript
Out of context: Reply #5
- Started
- Last post
- 6 Responses
- meph5040
if all your lines are terminated by a semicolon I don't see why you can't put it all on one line, and java script doesn't care if it is in the body or the head as long as the function call is after the functions def.
I would personally suggest putting it into a .js file then import it where you need it, that way the code can be edited later with out it being a nightmare.