how to find type of dom element in js code example
Example: how to know type of dom element in js
let divElement = document.createElement('div');
if (divElement.nodeName == "DIV") //true
if (divElement.nodeName == "<div>") //false
let divElement = document.createElement('div');
if (divElement.nodeName == "DIV") //true
if (divElement.nodeName == "<div>") //false