function prova(){
return {A:3,B:4}
}

var ritProva=prova();
i valori sono in ritProva.A e ritProva.B