Skip to content

Commit 4772b42

Browse files
author
wangwenjie
committed
update
1 parent 42a2b5b commit 4772b42

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,68 @@ function commafy(num) {
16551655
//"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36"
16561656
```
16571657

1658+
- 你感觉下面的代码会输出什么?
1659+
1660+
```javascript
1661+
//1.考察函数提升
1662+
var a=0;
1663+
function b(){
1664+
alert(a);
1665+
var a= 1;
1666+
}
1667+
b();
1668+
1669+
//2.原型的构造器
1670+
function a(){
1671+
1672+
}
1673+
console.log(a.prototype.constructor);
1674+
1675+
//3.this
1676+
var a={
1677+
fn1:function(){
1678+
console.log(this);
1679+
}
1680+
}
1681+
var b=a.fn1;
1682+
b();
1683+
1684+
//4.typeof
1685+
console.log(typeof "1");
1686+
1687+
//5.闭包
1688+
function a(){}
1689+
function b(p){
1690+
var c=0;
1691+
p.prototype.fn1= function(){
1692+
console.log(++c);
1693+
}
1694+
}
1695+
b(a);
1696+
var d = new a();
1697+
var e = new a();
1698+
d.fn1();
1699+
e.fn1();
1700+
```
1701+
1702+
- 个人经历面试题
1703+
1704+
```javascript
1705+
1706+
1、基于flex弹性布局如何布下面的布局[ABC内外间隔10px][BC间隔10px]
1707+
-----------------------
1708+
|--------| |--------|
1709+
| | | B |
1710+
| | |--------|
1711+
| A |
1712+
| | |--------|
1713+
| | | C |
1714+
|--------| |--------|
1715+
-----------------------
1716+
1717+
2、如何检测当前变量为Array
1718+
1719+
```
16581720

16591721
## <a name='other'>其他问题</a>
16601722

0 commit comments

Comments
 (0)