static-demo / prototype.js
duqing2026's picture
备份
a244346
raw
history blame contribute delete
423 Bytes
function Person() {}
const person1 = new Person();
console.log(person1.prototype);
// case 1
var scope = "global scope";
function checkscope(){
var scope = "local scope";
function f(){
return scope;
}
return f();
}
checkscope();
// case 2
var scope = "global scope";
function checkscope(){
var scope = "local scope";
function f(){
return scope;
}
return f;
}
checkscope()();