avoid casting with as whenever possible avoid unsafe types like any prefer checking for presence with 'val == null' instead of '!val' avoid adding comments explaining code prefer for of loops over traditional for loops or forEach