is there a way to add class or id to createElement in javascript code example
Example: create element javascript with class
// create div element by javascript with class
var div = document.createElement('div');
div.className = "div1";
// create div element by javascript with class
var div = document.createElement('div');
div.className = "div1";