There's a MDN article that states that:
The structured clone algorithm is a new algorithm defined by the HTML5 specification for serializing complex JavaScript objects. It's more capable than JSON
So, I believe this means that it's more capable than cloning in this way:
JSON.parse(JSON.stringify(obj))
suggested in this thread. The JSON way has many drawbacks like not supporting circular references, dropping everything not supported by JSON spec, like functions, and representing Date object as strings.
I then thought that structured clone algorithm is deep copy algorithm implemented by many libraries. However, it's listed on the same page with the words:
If you want a deep copy of an object (that is, a recursive copy of all nested properties, walking the prototype chain), you must use another approach. The following is a possible example.
So now I'm confused and don't know what is structured algorithm or how it's different from deep copy. Any help? I don't want to read a spec, maybe some libraries implemented it, so I can read their source code.