ECMAScript-features | ECMAScript features cheatsheet | Script Programming library
kandi X-RAY | ECMAScript-features Summary
kandi X-RAY | ECMAScript-features Summary
While creating symbols, you also can add a description to it for debugging purposes. But there was no method to access the description directly before ES2019. Considering this, ES2019 introduced a read-only description property to retrieve a string containing the description of the Symbol. This gives the possibility to access symbol description for different variations of Symbol objects.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the fact .
- Logging api
- Say the hello
- Computes the sum of a new array .
- Functions .
- a 2 function
- print the arguments
- Helper function .
- print a msg to console
- Adds two numbers .
ECMAScript-features Key Features
ECMAScript-features Examples and Code Snippets
Community Discussions
Trending Discussions on ECMAScript-features
QUESTION
It is mentionned on the ECMAScript standard here that :
... These features are not considered part of the core ECMAScript language. Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code. ECMAScript implementations are discouraged from implementing these features unless the implementation is part of a web browser or is required to run the same legacy ECMAScript code that web browsers encounter.
There is also a red warning on MDN : String.prototype.substr() MDN doc
Does anyone know why (ECMAScript standard say that) programmers should not use or assume the existence of String.prototype.substr
?
ANSWER
Answered 2018-Oct-04 at 06:27Because it's never been part of the standardized language. It wasn't in the ECMAScript 1 or 2 specs at all, and only appears in ECMAScript 3 in Section B.2 ("Additional Properties") (and subsequent editions in similar annexes), which said:
Some implementations of ECMAScript have included additional properties for some of the standard native objects. This non-normative annex suggests uniform semantics for such properties without making the properties or their semantics part of this standard.
Moreover, substr
is largely redundant with substring
, but the second argument has a different meaning, as well as with slice
.
In pragmatic terms, I'd be surprised if you found a mainstream JavaScript engine that didn't provide it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ECMAScript-features
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page