From 2968a9d0f80738dec19ec51d82e2b3c6e04b6515 Mon Sep 17 00:00:00 2001 From: SylviaZ Date: Fri, 22 Mar 2019 20:54:43 +0800 Subject: [PATCH 1/2] fix: correct the layout problem in issue #294 --- 1-js/02-first-steps/11-logical-operators/article.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/1-js/02-first-steps/11-logical-operators/article.md b/1-js/02-first-steps/11-logical-operators/article.md index 655efe2a42..7f67b38292 100644 --- a/1-js/02-first-steps/11-logical-operators/article.md +++ b/1-js/02-first-steps/11-logical-operators/article.md @@ -117,11 +117,9 @@ alert( undefined || null || 0 ); // 0(所有的转化结果都是 false,返 ``` 如果 `currentUser` 和 `defaultUser` 都是假值,那么结果就是 `"unnamed"`。 - 2. **短路取值。** 操作数不仅仅可能是值,还可能是任意表达式。或运算会从左到右计算并测试每个操作数。当找到第一个真值,计算就会停止,并返回这个值。这个过程就叫做“短路取值”,因为它将从左到右的计算尽可能的少。 -    当表达式作为第二个参数并且有一定副作用,比如变量赋值,的时候,这就清楚可见了。 如果我们运行下面的例子,`x` 将不会被赋值: From 38c74dfdd74d6774adaf08f0c6922d26c6bd69d4 Mon Sep 17 00:00:00 2001 From: SylviaZ Date: Sat, 23 Mar 2019 11:24:53 +0800 Subject: [PATCH 2/2] fix: recorrect the layout... --- 1-js/02-first-steps/11-logical-operators/article.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1-js/02-first-steps/11-logical-operators/article.md b/1-js/02-first-steps/11-logical-operators/article.md index 7f67b38292..7a65d5bbbc 100644 --- a/1-js/02-first-steps/11-logical-operators/article.md +++ b/1-js/02-first-steps/11-logical-operators/article.md @@ -120,7 +120,8 @@ alert( undefined || null || 0 ); // 0(所有的转化结果都是 false,返 2. **短路取值。** 操作数不仅仅可能是值,还可能是任意表达式。或运算会从左到右计算并测试每个操作数。当找到第一个真值,计算就会停止,并返回这个值。这个过程就叫做“短路取值”,因为它将从左到右的计算尽可能的少。 -    当表达式作为第二个参数并且有一定副作用,比如变量赋值,的时候,这就清楚可见了。 + + 当表达式作为第二个参数并且有一定副作用,比如变量赋值的时候,这就清楚可见了。 如果我们运行下面的例子,`x` 将不会被赋值: