Lack of type safety in Javascript
FWIW, you can decorate your code with JSDoc comments (@type, @param, @returns, etc.), then use either the Typescript compiler or the Google Closure compiler to validate the type-safety. If you find yourself in an environment where you can't use Typescript directly, this is the next best thing.