Optimizing JavaScript Organization and Dealing with Ten Thousand Character Limit

David raised a question about organizing his JavaScript code and handling a payload with different objects. The suggestion given was to focus on cleaning up the code by using JavaScript Beautifiers and indenting the code properly. This would make it easier to read and understand. It was also advised to break up the code into functions if needed, but ensure they are globally accessible and defined outside of a webflow push. The concern of reaching the 10,000 character limit was also discussed, and it was suggested that if necessary, the code could be split into different embeds or functions could be referenced across different embeds. The issue of comments counting towards the character limit was mentioned, and it was suggested to check if Webflow automatically removes comments or if it needs to be turned on. Overall, the approach and organization of the code seemed sound, and David was given the go-ahead to continue with his current approach.


(Source: Office Hours 1/24 )

State Change Members Can View The Video Here
chris-montgomery-smgTvepind4-unsplash.jpg

View This Video Now

Join State Change Risk-Free