Peculiarities of EcmaScript 6 Symbol type…

EcmaScript, the de facto client-side scripting language most commonly implemented by the name JavaScript has had the official specifications of its 6th edition out in June this year. Web app development would be taken to a whole new level as browser vendors implement this new spec. One of the things I’m most interested in at the moment is the Symbol type.

Note: Symbols are a recent development and are only usable in current browsers. Edge and Firefox fully implement it while Chrome has most of Symbol’s features. Safari has not yet implemented symbols so do not use it in your production code just yet.

Fail proof access to JavaScript’s built-in types…

JavaScript is a beautiful programming language, the de facto client side scripting language of the web until something new comes along, which I don’t think will ever happen. It’s extremely elastic in that one can create user defined methods to use with built in objects like Functions, Arrays and even generic objects. It exposes DOM and HTML interfaces that one can extend as per the requirements of the web app they’re building.

It is so flexible that features not available in certain browsers, due to poor implementations of W3 standards or a complete disregard of their recommendations, could be added dynamically by writing JavaScript code that fills in those gaps, usually referred to as shims or polyfills. However, with this kind of malleability, it is also possible to overwrite built-in objects references.