Push Object Into Empty Array Javascript Function