JavaScript supports automatic type conversion. Since it is weakly typed, you can pass a function as an argument into another function easily.
This ensures that there are no errors or data type-associated warnings as values get converted to the required data type automatically.