A cheatsheet for javascript syntax with added Swift examples where relevant. Most of this is generic javascript stuff but there's some react specific info at the bottom.
// 'const' for a variable that will not change, eslint will warn you if you try to mutate this
// 'let' for a mutable variable, you may also see var in some tutorials which is sort of the legacy version of let
// Always prefer const, only use let when absolutely necessary. This makes it clear which variables are likely to be reassigned over time!
const x = 0