Skip to content

Commit bc489cd

Browse files
committed
update
1 parent 0367286 commit bc489cd

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
---
99
## JavaScript基础知识剖析
10-
#### 01
10+
#### 01 变量与原型
1111
* [01-01](https://github.com/TYRMars/JSlearn#01-01) `变量类型和计算(1)`
1212
* [01-02](https://github.com/TYRMars/JSlearn#01-02) `变量类型和计算(2)`
1313
* [01-03](https://github.com/TYRMars/JSlearn#01-03) `变量类型和计算(3)-JSON的理解`
@@ -45,7 +45,11 @@
4545
#### 07
4646
* [07-01](https://github.com/TYRMars/JSlearn#07-01) `上线回滚-上线回滚流程`
4747
#### 08 JS算法
48-
* [08-01](https://github.com/TYRMars/JSlearn#08-01) `排序算法`
48+
* [08-01](https://github.com/TYRMars/JSlearn#08-01) `JavaScript算法测试函数`
49+
* [08-02](https://github.com/TYRMars/JSlearn#08-02) `JavaScript算法-冒泡排序`
50+
* [08-03](https://github.com/TYRMars/JSlearn#08-03) `JavaScript算法-选择排序`
51+
#### 09 函数应用
52+
* [09-01](https://github.com/TYRMars/JSlearn#09-01) `JavaScript算法测试函数`
4953

5054
---
5155

@@ -129,7 +133,7 @@ console.log(!window.acb); //true
129133

130134
//判断一个变量会被当做true还是false
131135
var a = 100;
132-
console.log(!!a);
136+
console.log(!!a);//true
133137
```
134138
## 01-02
135139
### 变量类型和计算(2)
@@ -146,7 +150,7 @@ typeof null //object
146150
typeof console.log //funciton
147151
```
148152
* 总结来说typeof可以得到`undefined、String、number、boolean`可以区分值类型,但对于引用类型无法很细的区分,只能区分函数。
149-
* 尤其是`typeof null //object`它是一个引用类型
153+
* 尤其是`typeof null object`它是一个引用类型
150154
#### 何时使用 === 和 ==
151155
```JavaScript
152156
//问题:何时使用===何时使用==
@@ -1578,7 +1582,7 @@ module.exports = {
15781582
* 经常需要登陆测试机来自己配置、获取数据
15791583

15801584
## 08-01
1581-
### 算法测试函数
1585+
### JavaScript算法测试函数
15821586
* SetData()函数生成了存储在数组中的随机数字。Math类的random()函数会生成[0,1)区间内的随机数字。换句话说,random()函数生成的随机数字大于等于0,但不会等于1。最后在用Math类的floor()函数确定最终结果。
15831587
* 如下这个公式可以成功生成1~100的随机数字集合。
15841588

@@ -1639,7 +1643,7 @@ console.log(myNums.toString());
16391643
```
16401644

16411645
## 08-02
1642-
### 算法测试-冒泡排序
1646+
### JavaScript算法-冒泡排序
16431647

16441648
* 冒泡排序
16451649
* 最慢的排序算法之一
@@ -1753,7 +1757,7 @@ console.log(mynums.toString);
17531757
 var audi = new Car("audi", "silver");
17541758
 var benz = new Car("benz", "black");
17551759
 var ferrari = new Car("ferrari", "yellow");
1756-
 ```
1760+
```
17571761

17581762
5. 函数调用模式
17591763

@@ -1770,7 +1774,7 @@ console.log(mynums.toString);
17701774
     helper();
17711775
   }
17721776
 }
1773-
 ```
1777+
```
17741778

17751779
6. arguments转数组
17761780

@@ -1826,11 +1830,8 @@ console.log(mynums.toString);
18261830
 for(var i=0;i<=10;i++){
18271831
   console.log(factorial(i)); 
18281832
 }
1829-
```
1830-
 
1831-
10. 记忆函数
18321833
1833-
```JavaScript
1834+
//记忆函数
18341835
 var factorial = (function(){
18351836
   var memo = [1];
18361837
   var count = 0;
@@ -1852,7 +1853,8 @@ console.log(mynums.toString);
18521853
 }
18531854
```
18541855

1855-
11. curry函数柯里化
1856+
10. curry 函数柯里化
1857+
* 把接受多个参数的函数变换成接受一个单一参数(最初函数的第一个参数)的函数,并且返回接受余下的参数而且返回结果的新函数的技术
18561858

18571859
```JavaScript
18581860
 function add(value){

0 commit comments

Comments
 (0)