From 8d1313c84cc82d81363ed62b75baedb9a65ff2e3 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:08:24 +0800 Subject: remove font tag in zh-CN --- files/zh-cn/web/javascript/reference/global_objects/string/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/index.html') diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/index.html index 5cea932350..c69faea0c4 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/string/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/string/index.html @@ -175,7 +175,7 @@ else

使用从字符串实例继承而来的 {{jsxref("String.localeCompare", "localeCompare")}} 方法也能达到同样的效果。 

-

基本字符串和字符串对象的区别

+

基本字符串和字符串对象的区别

请注意区分 JavaScript 字符串对象和基本字符串值 . ( 对于 {{jsxref("Global_Objects/Boolean", "Boolean")}} 和{{jsxref("Global_Objects/Number", "Numbers")}} 也同样如此.)

@@ -188,7 +188,7 @@ console.log(typeof s_prim); // Logs "string" console.log(typeof s_obj); // Logs "object" -

当使用 {{jsxref("Global_Objects/eval", "eval")}}时,基本字符串和字符串对象也会产生不同的结果。eval 会将基本字符串作为源代码处理; 而字符串对象则被看作对象处理, 返回对象。 例如:

+

当使用 {{jsxref("Global_Objects/eval", "eval")}}时,基本字符串和字符串对象也会产生不同的结果。eval 会将基本字符串作为源代码处理; 而字符串对象则被看作对象处理, 返回对象。 例如:

s1 = "2 + 2";               // creates a string primitive
 s2 = new String("2 + 2");   // creates a String object
-- 
cgit v1.2.3-54-g00ecf