I have the following code
var Datos = function(){
this.salas = ['something','other'];
}
Datos.prototype.getSalas = function(){
return this.salas;
}
Then, If I do
var datos = new Datos();
var myArray = datos.getSalas();
Why "myArray" var is now a function and not an array?
How can I convert to an array this variable?
Works for me:
https://jsfiddle.net/v558tzbj/