Skip to content

Commit df3d650

Browse files
authored
Merge pull request #530 from xuv/typo-fix
Fixes incorrect rendering of html characters in Conditions example
2 parents 66a3813 + 4b78629 commit df3d650

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: src/content/examples/en/02_Animation_And_Variables/03_Conditions/description.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can read more about comparison operators
2020
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#relational_operators" target="_blank">on MDN</a>.
2121

2222
Logical operators allow conditions to be combined.
23-
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND" target="_blank">&amp;$amp;</a>
23+
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND" target="_blank">&amp;&amp;</a>
2424
checks that both conditions are true. The circle in this example
2525
has a black fill when it is toward the horizontal center of the canvas, and it
2626
has a white fill when it is not. This is because of the if statement on line
@@ -29,4 +29,4 @@ no more than 300.
2929
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR" target="_blank">||</a>
3030
checks that at least one of the conditions is true. The circle reverses horizontal
3131
speed when it reaches the left or right edge of the canvas because of the if statement
32-
on line 75.
32+
on line 75.

Diff for: src/content/examples/hi/02_Animation_And_Variables/03_Conditions/description.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ oneLineDescription: जब आपका स्केच चल रहा हो
99
तुलना ऑपरेटर दो मानों की तुलना करके स्थितियाँ बनाने में मदद करते हैं। इस उदाहरण में, पंक्ति 69 पर <code>if</code> कथन के कारण रंग कम से कम 360 होने पर वृत्त का रंग शून्य पर रीसेट हो जाता है। आप तुलना ऑपरेटरों के बारे में अधिक पढ़ सकते हैं <a href='https://developer.mozilla.org/ en-US/docs/Web/JavaScript/Reference/Operators#relational_operators' target='_blank'>MDN</a> पर।
1010

1111

12-
तार्किक संचालक शर्तों को संयोजित करने की अनुमति देते हैं। <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operator/Logical_AND' target='_blank'>&amp;$amp;</a> जांचता है कि दोनों स्थितियां सच हैं। इस उदाहरण में वृत्त जब कैनवास के क्षैतिज केंद्र की ओर होता है तो उसमें काला भराव होता है, और जब ऐसा नहीं होता है तो उसमें सफेद भराव होता है। ऐसा पंक्ति 45 पर दिए गए <code>if</code> कथन के कारण है, जो जाँचता है कि वृत्त की x स्थिति कम से कम 100 है और 300 से अधिक नहीं है।
12+
तार्किक संचालक शर्तों को संयोजित करने की अनुमति देते हैं। <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operator/Logical_AND' target='_blank'>&amp;&amp;</a> जांचता है कि दोनों स्थितियां सच हैं। इस उदाहरण में वृत्त जब कैनवास के क्षैतिज केंद्र की ओर होता है तो उसमें काला भराव होता है, और जब ऐसा नहीं होता है तो उसमें सफेद भराव होता है। ऐसा पंक्ति 45 पर दिए गए <code>if</code> कथन के कारण है, जो जाँचता है कि वृत्त की x स्थिति कम से कम 100 है और 300 से अधिक नहीं है।
1313
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operator/Logical_OR' target='_blank'>||</a> जांचता है कि इनमें से कम से कम एक स्थितियाँ सत्य हैं। जब वृत्त पंक्ति 75 पर दिए गए <code>if</code> कथन के कारण कैनवास के बाएँ या दाएँ किनारे तक पहुँचता है तो वह क्षैतिज गति को उलट देता है।

Diff for: src/content/examples/zh-Hans/02_Animation_And_Variables/03_Conditions/description.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if 和 else 语句用于规定一组特定的 <a href="https://developer.mozilla
99

1010
比较运算符通过比较两个值来形成条件。在这个例子中,当圆形的色相达到360或更大时,根据第69行的 if 语句,色相会重置为零。若要浏览更多比较运算符的信息,请阅读 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#relational_operators" target="_blank">MDN 上的相关文档</a>。
1111

12-
通过逻辑运算符,可以将条件进行组合。<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND" target="_blank">&amp;$amp;</a> 检查两个条件是否同时为真。在这个例子中,当圆位于画布的水平中心附近时,它的填充颜色为黑色;当它不在这个位置时,填充颜色为白色。这是因为第45行的 if 语句会检查圆的 x 坐标,看它是否大于等于 100 且不超过 300。而 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR" target="_blank">||</a> 检查的则是两个条件中至少有一个为真的情况。根据第75行的 if 语句,当圆到达画布的左边缘或右边缘时,它会保持水平速度并调头。
12+
通过逻辑运算符,可以将条件进行组合。<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_AND" target="_blank">&amp;&amp;</a> 检查两个条件是否同时为真。在这个例子中,当圆位于画布的水平中心附近时,它的填充颜色为黑色;当它不在这个位置时,填充颜色为白色。这是因为第45行的 if 语句会检查圆的 x 坐标,看它是否大于等于 100 且不超过 300。而 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR" target="_blank">||</a> 检查的则是两个条件中至少有一个为真的情况。根据第75行的 if 语句,当圆到达画布的左边缘或右边缘时,它会保持水平速度并调头。

0 commit comments

Comments
 (0)