I am trying to return two values in JavaScript. Is this possible?
var newCodes = function() { var dCodes = fg.codecsCodes.rs; va
Well we can not exactly do what your trying. But something likely to below can be done.
function multiReturnValues(){ return {x:10,y:20}; }
Then when calling the method
const {x,y} = multiReturnValues(); console.log(x) ---> 10 console.log(y) ---> 20