Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js-destructuring

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
Source by realworldjs.medium.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+6 =