function CreateNewElement(tag, css){
console.log(tag);
this.css = css;
this.tag = tag;
try{
for(let i = 0; i<arguments.length; i++){
if(arguments[i] == undefined){
throw new Error("Отсутствует аргумент " + arguments[i]); //(1)
}
}
console.log("A new html tag has been created: \n <"+tag+" style=\"" + css + "\">");
}catch(e){
alert(e.name + "\n" + e.message);
}
};
var div = new CreateNewElement(undefined, "color:white;");
if (tag === undefined) {
throw new Error('Укажите tag');
}
tag = tag || '<div>';