If height param is not number - then log and set to default
I usually only use ternaries if I can keep my code clean and at the same time keep the ternary under 2-3 lines. That's just me, but I would make a few small changes to increase readability.

class Example1 {
  constructor(height) {
    this.defaultHeight = 100;

    this.height = typeof height === 'number' ? height : 
      (() =&gt; {
        console.log(height, 'is not a number');
        return this.defaultHeight;
      })();

  }
}