js oop without this prototype object.create util.inherits

Опубликовано: 07 Апрель 2026
на канале: Andrew Bin
200
2

JavaScript Object-oriented programming, inheritance

What is we don't want to use 'this' and 'prototype'

'this' is kind of variable, it can be changed, it isn't supposed to keep as
constant. Here we want to find a way not using 'this'. Not as seriously as
normal programmers, we are just trying it for fun.

Yes, I know some one would talk about `polymorphism`, if they are good enough.
But, it's another topic, we are not going to talk it here.

Referrences

James Shore
http://www.objectplayground.com/

MDN
https://developer.mozilla.org/en-US/d...

node.js, API: events, util
https://nodejs.org/en/

google javascript object inherit

My codes, a.js aa.js, ab.js abb.js
https://github.com/goodagood/testexp
....

We did 4 examples, 2 by 2. We comapred ways of oop with and without 'this'
'prototype', 'Object.create', 'util.inherits'.

Just for fun, and so.
Thank you for watching.