This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 238121 - Highlight NaN, Infinity and undefined
Summary: Highlight NaN, Infinity and undefined
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Reema
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-08 04:20 UTC by peterkehl
Modified: 2017-04-19 10:33 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peterkehl 2013-11-08 04:20:50 UTC
Since ECMAScript 5 (i.e. Firefox 4 and newer), NaN, Infinity and undefined are non-writable global objects. So, effectively they act like keywords or literals (even though they are not).

Please, would you consider highlighting them blue like a keyword, or green like a field, or in some other way distinguishing them from standard variables/symbols.

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8.5: The NaN, Infinity, and undefined global objects have been made read only, per the ECMAScript 5 specification.