JS1191: Expected ','. Write 'identifier : Type' rather than 'Type identifier' to declare a typed parameter

A function declaration includes parameters that are not separated with commas or a type annotated parameter that is specified as Type identifier instead of identifier : Type.

To correct this error

  1. Make sure all parameters are separated with commas.

  2. Specify type-annotated parameters with the identifier : Type syntax.

See Also

Reference

function Statement

Concepts

Troubleshooting Your Scripts

Other Resources

JScript Reference

JScript Functions