Get First Element From Array Javascript Function How To Use