Skip to content Skip to sidebar Skip to footer
Showing posts with the label Oop

Oop Javascript - Is "get Property" Method Necessary?

Given a very simple js object constructor and its prototype... function MyTest(name) { … Read more Oop Javascript - Is "get Property" Method Necessary?

Javavscript Change Sub-class Property On Instantiation

if I have myClass.prototype.subClass= { foo:false } when I create a new instance on an object how… Read more Javavscript Change Sub-class Property On Instantiation

'this' Keyword Overriden In Javascript Class When Handling Jquery Events

I have defined a class in JavaScript with a single method: function MyClass(text) { this.text =… Read more 'this' Keyword Overriden In Javascript Class When Handling Jquery Events

Javascript Prototypes,objects,constructor??i Am Confused

I have gone through plenty of Stack Overflow question that had description but I seriously found th… Read more Javascript Prototypes,objects,constructor??i Am Confused

Javascript Prototypical Inheritance Confused

given the standard way of achieving inheritance like this function BaseClass() { } function SubCl… Read more Javascript Prototypical Inheritance Confused

Call Static Methods When Using Default

When using ES6 modules and export default class how is it possible to call a static method from ano… Read more Call Static Methods When Using Default

Simple “class” Instantiation

From John Resig blog: // makeClass - By John Resig (MIT Licensed) function makeClass(){ return fu… Read more Simple “class” Instantiation

The Constructor Of Object.prototype

In JavaScript, every object inherits its properties and methods from a specific prototype, where pr… Read more The Constructor Of Object.prototype

Where The __proto__ Is Pointing When We Change The Prototype Of The Parent Object?

Normally when we create a new object using 'new' keyword, actually the __proto__ property o… Read more Where The __proto__ Is Pointing When We Change The Prototype Of The Parent Object?

Extending Object In Javascript

I'm trying to extend Object functionality this way: Object.prototype.get_type = function() { … Read more Extending Object In Javascript

Jquery And Object-oriented Javascript - Howto?

I've read this and this (thanks google) But it doesn't help enough. I'd like to know, i… Read more Jquery And Object-oriented Javascript - Howto?

Javascript Inheritance (infinite Loop When Using Superclass Function)

I am viewing Tuts+ OO JavaScript training: The way they do prototypical inheritance looks like: Em… Read more Javascript Inheritance (infinite Loop When Using Superclass Function)

Singleton Pattern And Abstraction In Js

Although the example below exploits ExtJS, one can easily extrapolate to another framework. I am a… Read more Singleton Pattern And Abstraction In Js

Javascript: Attaching Oop Methods To Events And The 'this' Keyword

I am new to OOP Javascript and am having trouble with the this keyword and events. What I'm try… Read more Javascript: Attaching Oop Methods To Events And The 'this' Keyword

Difference Between 'var A = B' And 'this.a = B'

I have been dealing and learning about Objects and OOP in JS in the past few days and I good a basi… Read more Difference Between 'var A = B' And 'this.a = B'

What Are Patterns You Could Use With Prototype Inheritance That You Cannot With Class?

Everyone seems to generally agree that prototype inheritance is simpler and more flexible than clas… Read more What Are Patterns You Could Use With Prototype Inheritance That You Cannot With Class?

Objects Convert Using Js Tostring() Method Gives Odd Result?

code in the below shown results of few conversions of data types using toString() method. all other… Read more Objects Convert Using Js Tostring() Method Gives Odd Result?

Call Static Methods When Using Default

When using ES6 modules and export default class how is it possible to call a static method from ano… Read more Call Static Methods When Using Default

JavaScript OOP In NodeJS: How?

I am used to the classical OOP as in Java. What are the best practices to do OOP in JavaScript usin… Read more JavaScript OOP In NodeJS: How?

How To Work With Private Variables In ES6?

In ES5, you could emulate a class with private and public variables like this: car.js function Car(… Read more How To Work With Private Variables In ES6?