This is fine, and we can get the values in this way thanks to array destructuring:const [age, name] = getDetails()Now we have the age and name variables that contain those values.Note that the order we define those in const [age, name] = getDetails() matters....
How to get the days between 2 dates in JavaScript Oct 26, 2019 How to wait for 2 or more promises to resolve in JavaScript Oct 25, 2019 JavaScript labeled statements Oct 23, 2019 How to check if a date refers to a day in the past in JavaScript Oct 16, 2019 How to check if...