I have always been told “Classes are just syntactic sugar for prototypes.”

But in this example this shows this isn't true.

```
function SubArray() {}
SubArray.prototype = new Array( );
console.log(Array.isArray(new SubArray()))  // false

```

and the same example with classes.

```
SubArray = class extends Array{}
console.log(Array.isArray(new SubArray()))  // true

```

Funnily `instanceof` works fine on both `new SubArray instanceof Array`.
Why isn’t `Array.isArray` returning `true` with prototype here?