Should I use Wasm or JavaScript?

I am trying to build a new add-on that automates various flows on aircraft. Is
there any guidance on whether I should use Wasm or JavaScript?

I would say, that it depends on if it should be tightly integrated with an
aircraft (as a mod) or if it is a more general tool used over several
aircrafts. In the latter case I would probably suggest making a new toolbar
panel in JS (see <https://github.com/bymaximus/msfs2020-toolbar-window-
template>). If you need more advanced SimConnect functionality, like masking
events, you might opt for WASM.

From what I can tell, certain features of the sim, such as local variables,
are not accessible from JavaScript.