From 0f39617006e592fdff67eb9b92cd945cade695c5 Mon Sep 17 00:00:00 2001 From: cloudymeatball <84962805+cloudymeatball@users.noreply.github.com> Date: Wed, 18 Sep 2024 23:54:00 -0400 Subject: [PATCH] fix 110 explanation trying to reassign a constant In explanation for #110 `JSON.parse()`, renamed second `jsonArray` to `jsonObject` --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b203a060..b1cc4a79 100644 --- a/README.md +++ b/README.md @@ -3584,8 +3584,8 @@ const jsonArray = JSON.stringify([1, 2, 3]); // '[1, 2, 3]' JSON.parse(jsonArray); // [1, 2, 3] // Stringifying an object into valid JSON, then parsing the JSON string to a JavaScript value: -const jsonArray = JSON.stringify({ name: 'Lydia' }); // '{"name":"Lydia"}' -JSON.parse(jsonArray); // { name: 'Lydia' } +const jsonObject = JSON.stringify({ name: 'Lydia' }); // '{"name":"Lydia"}' +JSON.parse(jsonObject); // { name: 'Lydia' } ```