How am I defining this as a function..?

Like literally…

How am I defining this as a function?
I am literally defining ms as a variable, and I get the error “TypeError: ms is not a function”
This is what I was talking about in this thread.
It’s just strange, since there things shouldn’t even really give a error.

Hi @zApexio I believe you are running afoul of the difficult-to-interpret JavaScript automatic semicolon insertion rules. Because the first character on the line with the final async statement can be interpreted as the beginning of a function call, the JavaScript engine doesn’t automatically insert a semicolon after the preceding line. You can read about this in http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.2 (for ES5) - the last example in that section closely follows what you’re doing.

I find these rules hard to remember, so I always use semicolons even though that marks me as pretty old school.

If you add a semicolon to your line ending with ms I think things will work as you expect them to.

Alright,
Time to just spam a lot of semicolons then,
1 per line of code without a continue on the next line.
.then and functions and more stuff like that.