javascript : Array .first
javascript : Array .first Target: Applicable with Array Data Type. Description : Return first element of array. Array[0] element Note: If array is empty then return undefined . Syntax: [] .first return Array[0] element Usase: [1,2,3,4,5].first It return 1 [].first It return undefined Download MYJS.js MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type. Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.