Get the last element from an array - Node.js Array

Node.js examples for Array:Last Element

Description

Get the last element from an array

Demo Code

export default function last(arr) {
  return arr[arr.length - 1];
}

Related Tutorials