| Version | Link |
|---|---|
| ECMAScript 2015 - ES2015 - ES6 | All Features List |
| ECMAScript 2016 - ES2016 - ES7 | All Features List |
| ECMAScript 2017 - ES2017 - "ES8" | All Features List |
| ECMAScript 2018 - ES2018 - "ES9" | All Features List |
| ECMAScript 2019 - ES2019 - "ES10" | All Features List |
| ECMAScript 2020 - ES2020 - "ES11" | All Features List |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This implementation does not work with Symbols, BigInts | |
| function stringify(data) { | |
| if (data === undefined) | |
| return undefined | |
| if (data === null) | |
| return 'null' | |
| if (data.toString() === "NaN") | |
| return 'null' | |
| if (data === Infinity) |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
- Does the design expect failures to happen regularly and handle them gracefully?
- Have we kept things as simple as possible?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toUTF8Array(str) { | |
| var utf8 = []; | |
| for (var i=0; i < str.length; i++) { | |
| var charcode = str.charCodeAt(i); | |
| if (charcode < 0x80) utf8.push(charcode); | |
| else if (charcode < 0x800) { | |
| utf8.push(0xc0 | (charcode >> 6), | |
| 0x80 | (charcode & 0x3f)); | |
| } | |
| else if (charcode < 0xd800 || charcode >= 0xe000) { |
I have following object:
var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};I want sort it by city names, so after sort it should be:
var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};But I can't sort object properties, instead can convert object into array, then sort items.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |