function to return all values in array javascript code example
Example: javascript function multiple return
function doubleEachElement(num1, num2) {
return [num1 * 2, num2 * 2];
}
const [a, b] = doubleEachElement(68, 100);
function doubleEachElement(num1, num2) {
return [num1 * 2, num2 * 2];
}
const [a, b] = doubleEachElement(68, 100);