dbKoda – MongoDB admin tool

dbKoda’s rich code editor allows you to compose MongoDB queries and scripts with syntax highlighting, auto-complete and code formatting. View output in foldable JSON, tabular format or as a chart. Generate visual explain plans with a single click. The explain plan viewer will suggest indexes that may improve performance, and provide one-button creation of those indexes. Leggi tutto

Event loop in JS

heap. where memory allocation happens call stack: is’t a data structure which records where in the program we are Single thread => one call stack => one thing at a timeNB (12′ 23″) The JS Runtime is single thread but there are WebAPIs which behave like threads and are aware Leggi tutto

What is a closure and how do you use it

Closures are important because they control what is and isn’t in scope in a particular function, along with which variables are shared between sibling functions in the same containing scope. Definition of the Closure given by Douglas Crockford: crockford.com/javascript/private.html Example: Closure is useful in hiding implementation detail in JavaScript. In other Leggi tutto

What is a Promise?

A promise is an object that may produce a single value some time in the future: either a resolved value, or a reason that it’s not resolved (e.g., a network error occurred). A promise may be in one of 3 possible states: fulfilled, rejected, or pending. Promise users can attach Leggi tutto