Posts

Showing posts from June, 2015

Javascript : the core

Image
An object A prototype chain Constructor Execution context stack Execution context Variable object Activation object Scope chain Closures This value Conclusion This note is an overview and summary of the “ ECMA-262-3 in detail ” series. Every section contains references to the appropriate matching chapters so you can read them to get a deeper understanding. Intended audience: experienced programmers, professionals. We start out by considering the concept of an  object , which is fundamental to ECMAScript. An object ECMAScript, being a highly-abstracted object-oriented language, deals with  objects . There are also primitives , but they, when needed, are also converted to objects. An object is a  collection of properties  and has a  single prototype object . The prototype may be either an object or the  null  value. Let’s take a basic example of an object. A prototype of an object is referenced by the internal [[Prototype]]  property. However, in figures we

Javascript Basics

This is very important when giving interviews as JQuery and other Javascript liberaries like Knockout , Angular are utilizing Javascript.  Also, its difficult to understand the code written in these liberaries if your concepts are not correct. Its always challange for a C# developer to correctly understand Javascript code because the way inheritance works in Javascript is totally different. I found a brief Blog which explains below points. 1.  Part 1 : Public/Private Variables and Methods This page shows how to create private variables and methods in "classes" in Javascript through the rather simple example of a person. (This is really a very rough approximation of the classical OOP pattern, and not necessarily a "best-practice" for JavaScript programming.)  Part 2  covers inheritance. Summary private variables  are declared with the 'var' keyword inside the object, and can only be accessed by private functions and privileged methods. private f