As a general rule this is how optimization should be thought of as. Not even specific to any language, you want to be executing as few instructions as possible. It can be damn near impossible to optimize certain things. For example:
int i = 4;
cannot be further simplified. This, however, could be.
int i = 2;
i++;
i++;
The result is the same, the amount of instructions required is not.
This is where scripts specifically might come into play. Some compilers may see the code above and automatically optimize it to something like the first example. However, scripts don't have the luxury of being precompiled before being run, so they dont benefit from this. Obviously this is a simplistic example, but try finding instances in your code where you might take multiple instructions to get the same result as one.
EDIT:
Just one way you could try doing this I thought of...
Try avoiding multiple function calls if you can do it in one. This may seem minor, but in situations of mass repetition (like in a loop) this could help. I'm not an expert on Javascript, but I know this to be the case in other languages. Obviously still make your functions do their job, but be conscious of how many calls you make and try to think of clever ways to reduce them.