You're assuming that the code that appears there won't run into JS issues when lines are moved (eg, non termination due to no ;).
Proceed with caution, and be aware there's potential for it to break in the future.
You can totally do it - just be quite mindful of the risk. I've done similar things - and even being a step crazier and removing it completely - here (view-source:https://freakdesign.com.au/)
Why are you doing it? If it's for reducing the size the amount saved is likely not worth the risk unless you've really gone through the site an optimised absolutely everything else.
I am mainly doing it for performance & speed not for reducing the size.
I have tried removing it completely as you said, buy the editor does not allow me save the file, showing an error, why not for you?
Now, the code which I have mentioned to you, Already BROKE :)) . I got an error from the google console. - > 4xx error - So I have reverted back to the old code.
My observations are that the user sessions are not recorded in shopify, i cams to know this from running google ads.
If we have shopify apps that run only offline at backend & not while the executed while the store is running for example like Newsletter apps, will commenting this code have any impact as such, what do you think?
Could you just share how you have done this?