From 7f06e4c1dbb5e96d33527d07adb8746e038fc38e Mon Sep 17 00:00:00 2001 From: Rico <805163443@qq.com> Date: Fri, 29 Dec 2023 11:45:35 +0800 Subject: [PATCH] Docs: Update for-and-while-statement.md (#27) --- .../current/for-and-while-statement.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/for-and-while-statement.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/for-and-while-statement.md index 2e6cd39..d5c2392 100755 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/for-and-while-statement.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/for-and-while-statement.md @@ -11,7 +11,7 @@ sidebar_label: for 和 while 语句 生成一个包含 1 到 20 的所有数字的数组,并打印每一项。 #### JavaScript 实现 -``` +```typescript let numbers = Array.from({ length: 20 }, (_, i) => (i + 1)); for (let el of numbers) { @@ -21,7 +21,7 @@ for (let el of numbers) { ``` #### Python 实现 -``` +```python numbers = range(1, 21) for el in numbers: