β¬οΈ Main Note
https://docs.google.com/document/d/1cPg55ANNVTQMV8g61WIUI0IA3g6wcoS16Q76Wr5ZXhU/edit
const aaa = [βaaaβ,βvvvβ,βcccβ]
const bbb = [βgggβ,βhhhβ]
// const ccc = [aaa,bbb] // => Fail
const ccc = [...aaa,...bbb] // => Success
Spread operator
is usually used to those of functions that don't contain a lot of depths in the object. JSON.stringify
literally stringifies the array into a string, and then it again parses the string into array. _.lodash
request and response is anyway sent as the form of object, and here, object and JSON are completely different things.
--> JSON is just a object-looking thing
--> JSON encompasses the object into the string.
...rest
is used. During the data protocol, request and response is sent to each other.
Usually, those request and responses are sent in the form of text that contains header and body.