const print = text => console.log(text); if(typeof alert === "undefined") { //function alert(text) { console.log("alert : ", text) }; var alert = text => print("alert : " + text); }