JavaScript / nodejs [JavaScript] Get the Last Item in an Array January 24, 2022 January 24, 2022 Arrays, element, ES2022, JavaScript, last const animals = [‘cat’, ‘dog’, ‘horse’] // before const lastItem = animals[animals.length - 1] // ES2022 const lastItem = animals.at(-1) [JavaScript] Download base64 encoded file within a browser [Git] Remove git from project Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *CommentName* Email* Website Save my name, email, and site URL in my browser for next time I post a comment.