I've been trying to solve a problem on a beginners testing site and I'm stuck on how to proceed. Can you please help with a complete block of code and any extra insight on where I'm going wrong so I can learn from it? Thank you.
If there is only one number in the array, that will be both the biggest and the smallest.
If there are no numbers in the array, it should return an empty object. The answer must be like {biggest: 10750, smallest: 36} in terms of formatting.
What I got before my brain stopped working;
function findBigSmall(numbers) {
const highest = Math.max(...numbers);
const lowest = Math.min(...numbers);
`"biggest:" ${highest}, "smallest:" ${lowest}`
}