The fileName is a non-standard property that contains the path of the file that raised this error. It is recommended to not use this property on production sites facing the web, as it may not work for every user. If called from the Firefox Developer Tools, “debugger eval code” is returned. This property is one of the parameters, which is passed during creating an error object.
Property value: Path of the file containing code that raised this error.
Return Value: It returns a string, representing the path of the file containing code that raised this error.
Error: Could not parse file The Error occurred at /Users/abhinavjain194/desktop/GFG/err.js
Error: Unexpected token output The Error occurred at /Users/abhinavjain194/desktop/GFG/token_err.js
- Google Chrome
- Internet Explorer