for(var i=0; i<6; i++) { setTimeout(() => { console.log(i) }) }
var a = function(){ this.b = 3 } var c = new a() a.prototype.b = 10 var b = 7 a() console.log(b)//3 console.log(c.b)//3
function repeat(func, times, wait){ ... } var rp = repeat(alert, 4, 3) rp('helloWorld')