# length-1 **Repository Path**: mirrors_WebReflection/length-1 ## Basic Information - **Project Name**: length-1 - **Description**: First negative index through Array - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-19 - **Last Updated**: 2026-04-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # length-1 [![build status](https://secure.travis-ci.org/WebReflection/length-1.svg)](http://travis-ci.org/WebReflection/length-1) [![npm version](https://badge.fury.io/js/length-1.svg)](https://badge.fury.io/js/length-1) First negative index through Array ```js var getLengthMinus1 = require('./length-1'); // Arrays fixed var arr = [1, 2, 3]; arr[-1]; // 3 // reusable tested functionality Object.defineProperty( NodeList.prototype, -1, {get: getLengthMinus1} ); document.querySelectorAll('#menu li')[-1]; ```