Skip to content

Commit

Permalink
[zh-cn] sync translated content (#25456)
Browse files Browse the repository at this point in the history
Co-authored-by: A1lo <yin199909@aliyun.com>
  • Loading branch information
mdn-bot and yin1999 authored Jan 15, 2025
1 parent cb73bff commit fd2d7d8
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 299 deletions.
2 changes: 2 additions & 0 deletions files/zh-cn/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2806,12 +2806,14 @@
/zh-CN/docs/Web/JavaScript/Guide/EventLoop /zh-CN/docs/Web/JavaScript/Event_loop
/zh-CN/docs/Web/JavaScript/Guide/Inheritance_Revisited /zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain
/zh-CN/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain /zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain
/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates /zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings
/zh-CN/docs/Web/JavaScript/Guide/Predefined_Core_Objects /zh-CN/docs/Web/JavaScript/Guide
/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Ranges /zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Groups_and_backreferences
/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions/量词 /zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Quantifiers
/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Unicode_property_escapes /zh-CN/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape
/zh-CN/docs/Web/JavaScript/Guide/Sameness /zh-CN/docs/Web/JavaScript/Equality_comparisons_and_sameness
/zh-CN/docs/Web/JavaScript/Guide/Statements /zh-CN/docs/Web/JavaScript/Guide/Control_flow_and_error_handling
/zh-CN/docs/Web/JavaScript/Guide/Text_formatting /zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings
/zh-CN/docs/Web/JavaScript/Guide/The_Iterator_protocol /zh-CN/docs/Web/JavaScript/Reference/Iteration_protocols
/zh-CN/docs/Web/JavaScript/Guide/Values,_variables,_and_literals /zh-CN/docs/Web/JavaScript/Guide/Grammar_and_types
/zh-CN/docs/Web/JavaScript/Guide/iterable /zh-CN/docs/Web/JavaScript/Reference/Iteration_protocols
Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -24164,7 +24164,7 @@
"hotbaby"
]
},
"Web/JavaScript/Guide/Numbers_and_dates": {
"Web/JavaScript/Guide/Numbers_and_strings": {
"modified": "2020-12-12T05:50:13.576Z",
"contributors": [
"柳涤尘",
Expand Down Expand Up @@ -24294,19 +24294,6 @@
"modified": "2020-06-28T13:50:25.946Z",
"contributors": ["srq18211"]
},
"Web/JavaScript/Guide/Text_formatting": {
"modified": "2020-07-13T05:48:34.741Z",
"contributors": [
"laampui",
"zhangchen",
"niccoming",
"evolighting",
"i-PeterZhang",
"456wyc",
"redman9",
"guangxiyu"
]
},
"Web/JavaScript/Guide/Typed_arrays": {
"modified": "2020-10-15T21:26:17.964Z",
"contributors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,4 @@ function updateBtn() {

在下一篇文章中,我们将探讨文本,以及 JavaScript 如何让我们操纵它。

> [!NOTE]
> 如果你喜欢数学,并希望阅读更多关于它如何在 JavaScript 中实现的,那么你可以在 MDN's main JavaScript 部分读到更多关于它的内容。对于学习[数字与日期](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates)[表达式与运算符](/zh-CN/docs/Web/JavaScript/Guide/Expressions_and_operators#运算符优先级)来说,那是一个不错的地方。
{{PreviousMenuNext("Learn_web_development/Core/Scripting/Variables", "Learn_web_development/Core/Scripting/Strings", "Learn_web_development/Core/Scripting")}}
2 changes: 1 addition & 1 deletion files/zh-cn/web/html/date_and_time_formats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,6 @@ HTML 中的日期和时间总会使用 [ASCII](https://zh.wikipedia.org/zh-cn/IS
- {{HTMLElement("input")}}
- {{HTMLElement("ins")}} 和 {{HTMLElement("del")}}:请查阅 `datetime` 属性,它指定了插入或删除内容的日期或本地日期和时间
- [ISO 8601 定义](https://www.iso.org/iso-8601-date-and-time-format.html)
- [JavaScript 指南](/zh-CN/docs/Web/JavaScript/Guide)中的[数字和日期](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates)
- [JavaScript 指南](/zh-CN/docs/Web/JavaScript/Guide)中的[数字和字符串](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings)
- JavaScript {{jsxref("Date")}} 对象
- 以给定区域选项格式化日期和时间的 [`Intl.DateTimeFormat`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) 对象
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 表达式与运算符
slug: Web/JavaScript/Guide/Expressions_and_operators
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Functions", "Web/JavaScript/Guide/Numbers_and_dates")}}
{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Functions", "Web/JavaScript/Guide/Numbers_and_strings")}}

本章描述了 JavaScript 的表达式和运算符,包括了赋值、比较、算数、位运算、逻辑、字符串、三元,等等。

Expand Down Expand Up @@ -633,4 +633,4 @@ var objectName = new objectType([param1, param2, ..., paramN]);
super([arguments]); // calls the parent constructor. super.functionOnParent([arguments]);
```

{{PreviousNext("Web/JavaScript/Guide/Functions", "Web/JavaScript/Guide/Numbers_and_dates")}}
{{PreviousNext("Web/JavaScript/Guide/Functions", "Web/JavaScript/Guide/Numbers_and_strings")}}
73 changes: 44 additions & 29 deletions files/zh-cn/web/javascript/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,38 @@ JavaScript 指南向你介绍如何使用 [JavaScript](/zh-CN/docs/Web/JavaScrip
- [逻辑运算符](/zh-CN/docs/Web/JavaScript/Guide/Expressions_and_operators#逻辑运算符)
- [条件(三元)运算符](/zh-CN/docs/Web/JavaScript/Guide/Expressions_and_operators#条件(三元)运算符)

## 数字与日期
## 数字与字符串

概述:[数字与日期](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates)
概述:[数字与字符串](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings)

- [`Number` 字面量](/zh-CN/docs/WJavaScript/概述:Guide/Numbers_and_dates#数字)
- [`Number` 对象](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates#数字对象)
- [`Math` 对象](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates#数学对象(math))
- [`Date` 对象](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_dates#日期对象)
- [数字](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings#数字)
- [`Number` 对象](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings#数字对象)
- [`Math` 对象](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings#数学对象(math))
- [字符串](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings#字符串)
- [`String` 对象](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings#string_对象)
- [模板字面量](/zh-CN/docs/Web/JavaScript/Guide/Numbers_and_strings#模板字面量)

## 文本格式化
## 表示日期与时间

概述:[文本格式化](/zh-CN/docs/Web/JavaScript/Guide/Text_formatting)
概述:[表示日期与时间](/zh-CN/docs/Web/JavaScript/Guide/Representing_dates_times)

- [字符串字面量](/zh-CN/docs/Web/JavaScript/Guide/Text_formatting#字符串)
- [字符串对象](/zh-CN/docs/Web/JavaScript/Guide/Text_formatting#字符串对象)
- [模版字面量](/zh-CN/docs/Web/JavaScript/Guide/Text_formatting#多行模板字符串)
- [国际化](/zh-CN/docs/Web/JavaScript/Guide/Text_formatting#国际化)
- [正则表达式](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions)
- [`Date` 对象](/zh-CN/docs/Web/JavaScript/Guide/Representing_dates_times#date_对象)

## 正则表达式

概述:[正则表达式](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions)

- [创建一个正则表达式](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions#创建一个正则表达式)
- [编写一个正则表达式的模式](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions#编写一个正则表达式的模式)
- [断言](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Assertions)
- [字符类](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes)
- [组和反向引用](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Groups_and_backreferences)
- [量词](/zh-CN/docs/Web/JavaScript/Guide/Regular_expressions/Quantifiers)

## 索引集合

概述:[索引集合](/zh-CN/docs/Web/JavaScript/Guide/Indexed_collections)

- [数组](/zh-CN/docs/Web/JavaScript/Guide/Indexed_collections#map%E6%95%B0%E7%BB%84)
- [类型数组](</zh-CN/docs/Web/JavaScript/Guide/Indexed_collections#类型化数组(Typed_Arrays_)>)

## 带键集合

概述:[带键集合](/zh-CN/docs/Web/JavaScript/Guide/Keyed_collections)
Expand All @@ -113,25 +119,26 @@ JavaScript 指南向你介绍如何使用 [JavaScript](/zh-CN/docs/Web/JavaScrip
- [对象和属性](/zh-CN/docs/Web/JavaScript/Guide/Working_with_objects#对象和属性)
- [创建对象](/zh-CN/docs/Web/JavaScript/Guide/Working_with_objects#创建新对象)
- [定义方法](/zh-CN/docs/Web/JavaScript/Guide/Working_with_objects#定义方法)
- [getter 和 setter](/zh-CN/docs/Web/JavaScript/Guide/Working_with_objects#定义_getters_与_setters)
- [getter 和 setter](/zh-CN/docs/Web/JavaScript/Guide/Working_with_objects#定义_getter_与_setter)

## 对象模型的细节
## 使用类

概述:[对象模型的细节](/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain)
概述:[使用类](/zh-CN/docs/Web/JavaScript/Guide/Using_classes)

- [基于原型的面向对象编程](/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#class-based_vs_prototype-based_languages)
- [创建对象层次结构](/zh-CN/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#%E5%88%9B%E5%BB%BA%E5%B1%82%E7%BA%A7%E7%BB%93%E6%9E%84)
- [继承](/zh-CN/docs/Web/JavaScript/Guide/Details_of_the_Object_Model#%E5%AF%B9%E8%B1%A1%E7%9A%84%E5%B1%9E%E6%80%A7)
- [声明一个类](/zh-CN/docs/Web/JavaScript/Guide/Using_classes#声明一个类)
- [各种类的特征](/zh-CN/docs/Web/JavaScript/Guide/Using_classes#构造函数)
- [扩展与继承](/zh-CN/docs/Web/JavaScript/Guide/Using_classes#扩展与继承)
- [为什么用类?](/zh-CN/docs/Web/JavaScript/Guide/Using_classes#为什么用类?)

## Promises
## Promise

概述:[Promises](/zh-CN/docs/Web/JavaScript/Guide/Using_promises)
概述:[Promise](/zh-CN/docs/Web/JavaScript/Guide/Using_promises)

- [约定](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#%E7%BA%A6%E5%AE%9A)
- [链式调用](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#%E9%93%BE%E5%BC%8F%E8%B0%83%E7%94%A8)
- [错误传递](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#%E9%94%99%E8%AF%AF%E4%BC%A0%E9%80%92)
- [组合](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#%E7%BB%84%E5%90%88)
- [时序](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#%E6%97%B6%E5%BA%8F)
- [保证](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#保证)
- [链式调用](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#链式调用)
- [错误处理](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#错误处理)
- [组合](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#组合)
- [时序](/zh-CN/docs/Web/JavaScript/Guide/Using_promises#时序)

## 迭代器与生成器

Expand All @@ -141,6 +148,14 @@ JavaScript 指南向你介绍如何使用 [JavaScript](/zh-CN/docs/Web/JavaScrip
- [可迭代对象](/zh-CN/docs/Web/JavaScript/Guide/Iterators_and_generators#可迭代对象)
- [生成器](/zh-CN/docs/Web/JavaScript/Guide/Iterators_and_generators#生成器函数)

## 国际化

概述:[国际化](/zh-CN/docs/Web/JavaScript/Guide/Internationalization)

- [日期与时间格式化](/zh-CN/docs/Web/JavaScript/Guide/Internationalization#日期与时间格式化)
- [Number 格式化](/zh-CN/docs/Web/JavaScript/Guide/Internationalization#number_格式化)
- [排序规则](/zh-CN/docs/Web/JavaScript/Guide/Internationalization#排序规则)

## 元编程

概述:[元编程](/zh-CN/docs/Web/JavaScript/Guide/Meta_programming)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: 数字和日期
slug: Web/JavaScript/Guide/Numbers_and_dates
title: 数字和字符串
slug: Web/JavaScript/Guide/Numbers_and_strings
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Expressions_and_operators", "Web/JavaScript/Guide/Text_formatting")}}本章节介绍了在 JavaScript 中使用数字和日期来处理和执行计算的概念,对象和函数。
{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Expressions_and_operators", "Web/JavaScript/Guide/Representing_dates_times")}}

本章节介绍了在 JavaScript 中使用数字和日期来处理和执行计算的概念,对象和函数。

本章节介绍如何掌握 Javascript 里的数字和日期类型

Expand Down Expand Up @@ -263,4 +265,4 @@ function JSClock() {

最后,如果`hour`是 12 或者更大,条件表达式会在`temp`后拼接"P.M.",否则拼接"A.M."。

{{PreviousNext("Web/JavaScript/Guide/Expressions_and_operators", "Web/JavaScript/Guide/Text_formatting")}}
{{PreviousNext("Web/JavaScript/Guide/Expressions_and_operators", "Web/JavaScript/Guide/Representing_dates_times")}}
4 changes: 2 additions & 2 deletions files/zh-cn/web/javascript/guide/regular_expressions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 正则表达式
slug: Web/JavaScript/Guide/Regular_expressions
---

{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Text_formatting", "Web/JavaScript/Guide/Indexed_collections")}}
{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Representing_dates_times", "Web/JavaScript/Guide/Indexed_collections")}}

正则表达式是用于匹配字符串中字符组合的模式。在 JavaScript 中,正则表达式也是对象。这些模式被用于 {{jsxref("RegExp")}} 的 {{jsxref("RegExp.exec", "exec")}} 和 {{jsxref("RegExp.test", "test")}} 方法,以及 {{jsxref("String")}} 的 {{jsxref("String.match", "match")}}、{{jsxref("String.matchAll", "matchAll")}}、{{jsxref("String.replace", "replace")}}、{{jsxref("String.search", "search")}} 和 {{jsxref("String.split", "split")}} 方法。本章介绍 JavaScript 正则表达式。

Expand Down Expand Up @@ -939,4 +939,4 @@ console.log(output.join("\n"));
</html>
```

{{PreviousNext("Web/JavaScript/Guide/Text_formatting", "Web/JavaScript/Guide/Indexed_collections")}}
{{PreviousNext("Web/JavaScript/Guide/Representing_dates_times", "Web/JavaScript/Guide/Indexed_collections")}}
Loading

0 comments on commit fd2d7d8

Please sign in to comment.