📜  数组解构 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:25.228000             🧑  作者: Mango

代码示例6
const getTemperature = (atticData) => atticData?.celsius ?? 15;
// insted do
const getTemperature = ({ celsius = 15 } = {}) => celsius;

// https://realworldjs.medium.com/never-use-the-dot-operator-in-javascript-ee0339d85fb