From 2297434878951856b54a913729dbd54c79c0ee9b Mon Sep 17 00:00:00 2001 From: Kenneth Lum Date: Thu, 4 Feb 2021 12:36:57 -0800 Subject: [PATCH] using the variable `data`... it actually is already data, in the form of a JavaScript object, it is not related to a "notation" as in JavaScript Object Notation using the variable `data`... it actually is already data, in the form of a JavaScript object, it is not related to a "notation" as in JavaScript Object Notation. It actually gave some other developers or beginners to think a JavaScript object is "json" -- a notation. JSON is more like, the JavaScript object, displayed as text or a string. --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 3e2d875..8a9e578 100644 --- a/public/index.html +++ b/public/index.html @@ -114,7 +114,7 @@

Example

fetch('https://jsonplaceholder.typicode.com/todos/1')
   .then(response => response.json())
-  .then(json => console.log(json))
+  .then(data => console.log(data))