sublimetext3 - Is there a root keyword in JavaScript or why does Sublime display it like this? - Stack Overflow

I used a variable called root in a recent JavaScript project, and Sublime Text 3 displayed it like this

I used a variable called root in a recent JavaScript project, and Sublime Text 3 displayed it like this:

So I'm wondering if there is a root keyword in JavaScript, and if so what does it do... Otherwise I'd like to know a way to stop Sublime Text from displaying it differently... The console, however, says ReferenceError: root is not defined when I type it in there.

I used a variable called root in a recent JavaScript project, and Sublime Text 3 displayed it like this:

So I'm wondering if there is a root keyword in JavaScript, and if so what does it do... Otherwise I'd like to know a way to stop Sublime Text from displaying it differently... The console, however, says ReferenceError: root is not defined when I type it in there.

Share Improve this question edited Sep 14, 2019 at 18:06 Armen Michaeli 9,2009 gold badges65 silver badges100 bronze badges asked Mar 28, 2017 at 11:42 Anton BallmaierAnton Ballmaier 86610 silver badges26 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 14

root used to be a variable in Node.js however it was deprecated in v6.

UPDATE: The old URL doesn't work anymore, so I've updated it with the Internet Archive's Wayback Machine's version of it, also here's the merge request with the change.

The declaration es from this file in Sublime.

UPDATE: To remove the syntax rule, install PackageResourceViewer as per the instructions here and then open up the JavaScript.sublime-syntax file, find the word root (there's currently only one) and remove it (and the following | character). Note that you'll need to run Sublime as an administrator on Windows in order to edit the file.

It seems root is not a keyword of javascript:

https://www.w3schools./js/js_reserved.asp

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743726441a4496695.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信