Mongodb Set Array In Javascript Functions With Parameters