isn’t it too hypothetical? as a best practice usually there shouldn’t be any console.log in production build, but let assume we are bad developers and put console log everywhere.
first assumption is that cloning object use memory but other kind of log doesn’t. but what will happen when we console.log large strings? the console that we are scrolling where it gets its content? doesn’t fall into the same category?
second assumption is that the object that we are cloning is too big, but to be frank a stringified object (if it can be stringified) wouldn’t be more than some kb. let assume it’s 50kb (which is kinda big) each object and 10000 * 50kb is still is 500MB, it’s negligible while default ram you can find on any laptop these days is 8GB
another sad truth is that if you write down 10000 console.log in firefox dev tools it will kill the firefox and freeze it. on frequent basis I need to close the dev tools to free ram and reopen it again. whenever my computer get slow there is a dev tools that is open in some tab.