const data = { portLand: ‘78/50‘, Dublin: ‘88/52‘, Lima: ‘58/40‘ } Object.defineProperty(data, ‘Lima‘, { enumerable: false, writable: false }) console.log(Object.keys(data)) console.log(Object.getOwnPropertyDescriptors(data)) console.log(Object.getOwnPropertyDescriptor(data, ‘Lima‘))
原文:https://www.cnblogs.com/qjb2404/p/12231388.html