Return 2 results from method call?

How could you return 2 results of a method call? Eg:

myMethod: function() { var car1 = 'blue'; var car2 = 'red'; return car1+car2; }

Something like that lol

You probably want to return an object.

myMethod: function(){
  return {
     car1: 'blue',
     car2: 'red'
  };
}
1 Like

Ah that works.