javascript – Promises – Asynchronous API request
This is an example of a simple GET API call wrapped in a promise to take advantage of its asynchronous functionality. va...
This is an example of a simple GET API call wrapped in a promise to take advantage of its asynchronous functionality. va...
You can test for IndexedDB support in the current environment by checking for the presence of the window.indexedDB prope...
Convert to String var date1 = new Date(); date1.toString(); Returns: "Fri Apr 15 2016 07:48:48 GMT-0400 (Eastern Da...
The JSON.parse() method parses a string as JSON and returns a JavaScript primitive, array or object: const array = JSON....
parseFloat accepts a string as an argument which it converts to a float/ parseFloat("10.01") // = 10.01 if you...
HTML comments (optionally preceded by whitespace) will cause code (on the same line) to be ignored by the browser also, ...
The multiplication operator (*) perform arithmetic multiplication on numbers (literals or variables). console.log( 3 * 5...
In Google Chrome, you can pause execution without needing to place breakpoints. Pause on Exception: While this button is...
If the engine is able to correctly predict you’re using a specific small type for your values, it will be able to ...
TypedArrays are a set of types providing different views into fixed-length mutable binary ArrayBuffers. For the most par...
Use new Date() to generate a new Date object containing the current date and time. Note that Date() called without argum...
5 Treat a property as a combination of two functions, one to get the value from it, and another one to set the value in ...
To trim whitespace from the edges of a string, use String.prototype.trim: " some whitespaced string ".trim(); ...
Chaining and Chainable is a design methodology used to design object behaviors so that calls to object functions return ...
Generally, Math functions that are given non-numeric arguments will return NaN. Math.floor("a") The square roo...