Get array first element - Node.js Array

Node.js examples for Array:First Element

Description

Get array first element

Demo Code


export function first(a) {
    return a.length > 0 ? a[0] : null;
}

Related Tutorials