A situation in which an object has a key value of undefined is encountered in a deep copy.

this undefined, will be ignored in all the methods that can be found on the Internet, but in fact, these undefined values are also meaningful. Is there any way to copy these values as undefined?

Oct.15,2021

The value

undefined is undefined, has no meaning in js, and should not be used to express some meaning. Null values should be expressed in null.

can be copied. You can use hasOwnProperty to determine whether key exists, or you can directly use the Object.keys () method

  

at present, the better implementation of deep copy is that the cloneDeep, of lodash can be used directly.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8a45-1ef6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8a45-1ef6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?