How to return multiple values from a function in JavaScript
September 28, 2022 — It wouldn’t sound too obvious but sometimes your function might need to return multiple values. For instance, in one of the applications I’m working on, I have a JavaScript function where I have to calculate two different values and return them.