In the js1.js file I create a new function. In j2.js I make a reference to the function created in js1.js. Unfortunately, Gomix does not recognize that the JS files should be aware of each other and displays an error message in the editor “‘Car’ is not defined.” Both files are in the index.html and running the code in a browser works.
Is it possible to configure Gomix editor so that the JS files are aware of each other? Or is this a bug?
This is not a Gomix error so much as a JSHint error (jshint is the thing that gomix uses to check your Javascript for simple errors).
While you can run your site as is without an issue, if you want to the error to go away you need to tell JSHint that you have defined the global variable “Car” somewhere else.
RedRiderX is correct, and that command will fix your issue To be more precise, we use eslint (http://eslint.org/) which is similar to jshint but has better support for the latest JavaScript versions