Check if Object is NOT instanceof Class in JavaScript-Code Examples

Radu TM

Check if Object is NOT instanceof Class in JavaScript

JavaScript by Radu TM June 21, 2022

const obj = {};

// check if obj is NOT an instance of the class 'Class'
if (!(obj instanceof Class)) {
  console.log('obj is not an instance of Class');
}

0

23.046

Check if Object is NOT instanceof Class in JavaScript

JavaScript by Radu TM June 21, 2022

if (!(object instanceof Class)) {
  // do something
}

0

23.046

Related JavaScript Queries

Latest JavaScript Queries

Explore code examples by categories