check if type is class js code example
Example 1: js class check if new instance
new Date() instanceof Date; // => true
Example 2: how to check has class name in js?
element.classList.contains(className);Code language: CSS (css)
new Date() instanceof Date; // => true
element.classList.contains(className);Code language: CSS (css)