From 12a899ab8540bc84f56a0dc6491be80a48499d49 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove name attribute for zh-TW --- .../web/javascript/reference/global_objects/json/stringify/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/zh-tw/web/javascript/reference/global_objects/json/stringify') diff --git a/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html b/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html index fdc8f8d1d0..98f01ef784 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/json/stringify/index.html @@ -76,7 +76,7 @@ JSON.stringify( Object.create(null, { x: { value: 'x', enumerable: false }, y: { -

The replacer parameter

+

The replacer parameter

The replacer parameter can be either a function or an array. As a function, it takes two parameters, the key and the value being stringified. The object in which the key was found is provided as the replacer's this parameter. Initially it gets called with an empty key representing the object being stringified, and it then gets called for each property on the object or array being stringified. It should return the value that should be added to the JSON string, as follows:

@@ -113,7 +113,7 @@ JSON.stringify(foo, replacer); // '{"week":45,"month":7}', only keep "week" and "month" properties -

The space argument

+

The space argument

The space argument may be used to control spacing in the final string. If it is a number, successive levels in the stringification will each be indented by this many space characters (up to 10). If it is a string, successive levels will be indented by this string (or the first ten characters of it).

-- cgit v1.2.3-54-g00ecf