"Functions and operators like Object.assign, Object.keys, object spread ({ ...obj }), and for–in loops behave differently depending on whether or not a property actually exists on an object."
基于官方的说法,这个场景更多针对于下面这类的用法: const a = {b:1, c:undefined} object.keys(a) // ['b', 'c'] const b = {b:1} object.keys(b) // ['b']