Short answer: No, you cannot use PURE JavaScript. As far as I know, Unity uses its own JS-like syntax (some call it Unity JS), but it is most often called UnityScript.
Your question comes from the fact that the Unity community refers to JavaScript and UnityScript as if they were equivalent and interchangeable.
Although these views are very similar, there are some fundamental differences, such as class-based UnityScript, while JavaScript does not support classes.
You can definitely use the previous JavaScripting conventions that you have chosen in UnityScript, as applicable. The semantics used are slightly different - but I found that it doesn't take a lot of time to pick up the small changes.
Read more about this here: UnityScript and JavaScript
Happy coding!
source share