I've been trying to create a system for reading and writing variables through expressions (i.e. a function to evaluate an expression like "Var1 == 0 & Var2 = 1" and similar functions to change/add/subtract variables). For a while, I've been assuming the best way to do this is to declare the variables in the Event Sheet as normal, then interact with them through code but it occurred to me after another readthrough of the (brilliant) scripting documentation that I could just declare the variables in script (let Var1 = 1, etc.) and avoid the awkwardness of Event Sheet/Javascript cross-communication altogether.
I'm still not completely confident with Javascript and would still keep the majority of the project in visual code. With that in mind, are there any particular pitfalls or dangers to handling most of my variables in javascript?