Tag: Javascript

Javascript

ES6 Class

Classes are one of the major features of ES6. In fact it wraps prototype based Object Oriented design and provides the developer a better and easier method to write code. It also helps developers who

Javascript

ES6 Arrow Functions

In ES6, a function can be written in a new way using =>. x/10; myFunc(50); // gives 5 --> This is useful in writing nameless handler functions. It has the same context as the code from which it i

TypeScript

TypeScript - Getting Started Guide

UPDATE : Based on TypeScript 2.1.4 TypeScript is the superset of ECMA2015 (ES6), which is the superset of ES5. TypeScript is transcompiled to Javascript before loading in web page. InstallationTypeS

Javascript

Recursively using a partial in Handlebars

The examples below show how a partial can be called in itself. It is useful in creating a dynamic nested menu. Frameworks:jQuery 1.9.1, Handlebars 4.0.6(update) IMPORTANT: As it is recursion, m

Javascript

Custom Handlebars Helper

The example below shows how custom helpers can be defined for Handlebars. Frameworks:jQuery 1.9.1, Handlebars 4.0.6(update)

Javascript

Javascript : Object, Function, Prototype

Object As we know an object is something that exists and owns a set of properties. The term object is used to refer anything in Javascript. From the list of objects available in Javascript, let us ex

Javascript

Object Oriented Javascript - 4 : Exercise 1

continuing Object Oriented Javascript - 3 : Function A Simple Problem Let us try to create the following simple three objects Person – base Student – inheriting Person Teacher – inheriting Person

Javascript

Object Oriented Javascript - 3 : Function

continuing Object Oriented Javascript - 2 : Prototype Function Defining a function A function can be defined in different ways. #1. Using keyword function This is the simplest way to define a funct

Javascript

Object Oriented Javascript - 2 : Prototype

continuing Object Oriented Javascript - 1 : Object Prototype Running the code below gives an alert showing undefined var car = { name:”i20”, manf:”hyundai”, exprice:650000, tax:100000, getOnRoad