The Javascript madness of types