JS Peculiarities: Runtime Class Definition

The inheritance pattern is an anti-pattern

JS has so many neat tricks up its sleeves.

In this video, the awesome guys from Meth Meth Methods demonstrate a cool way of class composition and inheritance patterns you can use to create classes.

Spread Syntax

In this video, you will also learn about a nice feature of JS called Spread Syntax. Which allows an iterable such as an array expression or string to be expanded in places where zero or more arguments are expected in a function call.

// Spread syntax enables us to send n number of arguments, and then use them as     
function composeRobot(...featureNames) {


composeRobot('jump', 'crouch', 'fly');

Subscribe for coding videos

Keep growing professionally with just three curated videos weekly.

We hate spam as much as you do.