I can’t think of any practical reason. I guess it’s just for completeness and flexibility. I haven’t worked with Maps, yet. Maybe using objects you received as keys for a Map and adding additional information as values.
Even if objects look the same they are different from each other. Same goes for function.
const a = {};
const b = {};
console.log(a===b); // false
For the same reason as above. The clone is a copy of the original Map, but is a different Map. This is useful if you are putting a map (or an object) as parameter to a function. If you modify the map inside the function, the original map gets changed, too. To avoid this you could just pass a clone of the original map into the function.
imagine a system the represent train system in certain country then we will have multiline and each line has many station so we could use a line as key and linked list of stations as value
for function i do not have an example for that one