Get First Element From Array Javascript Function Definition Is Not Allowed