SOURCE

function A(){
  if(Object.getPrototypeOf(this)!==A.prototype){
    return new A()
  }
  this.sa = 'sss'
}

A.prototype.sb = function(){
  console.log(this.sa)
}

A().sb()

new A().sb()
console 命令行工具 X clear

                    
>
console