I have the following arrays:
var a = ["F", "M"];
var b = ["female", "male"];
var c = ["fa-female", "fa-male"];
and I am able to assign b
to a
using for loop with:
ans[a[i]] = values[i]; // { M: "male", F: "female" }
how would I go about adding the third array and assign it to a
as well?
{ M: {"male", "fa-male"}, F: {"female", "fa-female"} }
or something similar?
EDIT: Result could either be an array or an object.