Is there a way to let a javascript function know that a certain parameter is of a certain type?
Being able to do something like this would be perfect:
No, JavaScript is not a statically typed language. Sometimes you may need to manually check types of parameters in your function body.