Lines Matching refs:foo
383 // 1、定义一个foo函数,其作用域不是if代码块,而是bar函数作用域。
384 function foo() {
385 console.log("hotel foo A");
388 // 2、再重复定义一次foo函数,覆盖上面if条件分支下的foo函数定义。
389 function foo() {
390 console.log("hotel foo 2");
393 foo && foo();
395 bar("hotel"); // 输出结果总是显示"hotel foo 2"
402 var foo;
404 foo = function () {
405 console.log("hotel foo 1");
408 foo = function () {
409 console.log("hotel foo 2");
412 foo && foo();
414 bar("hotel"); // 正确输出"hotel foo 1"
446 var foo = { x: 5 };
447 with(foo) {
520 var hasBarProperty = foo.hasOwnProperty("bar");
521 var isPrototypeOfBar = foo.isPrototypeOf(bar);
522 var barIsEnumerable = foo.propertyIsEnumerable("bar");
528 var hasBarProperty = Object.prototype.hasOwnProperty.call(foo, "bar");
529 var isPrototypeOfBar = Object.prototype.isPrototypeOf.call(foo, bar);
530 var barIsEnumerable = {}.propertyIsEnumerable.call(foo, "bar");