| Viewed 70 times

Return the First Element in an Array in JavaScript?


I need a function that takes an array and returns the first element. Examples getFirstValue([1, 2, 3]) // 1