---
title: "Discussion on \"[leetcode/JS] 2619. Array Prototype Last\" | Hashnode"
description: "Discussion on \"[leetcode/JS] 2619. Array Prototype Last\". 문제\nhttps://leetcode.com/problems/array-prototype-last/description/\n\nprototype object\n\nArray\n\nthis\n\n\n풀이\n전체 코드\ninterface Array<T> {\n    last(): T | -1;\n}\n\nArray.prototype.last = function() {\n    if(this.length < 1) return -1\n    return this[this.length..."
url: "https://hashnode.com/posts/leetcodejs-2619-array-prototype-last/695a1e9a49b7fa24fb41138c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[leetcode/JS\] 2619. Array Prototype Last](https://studio-pendant.hashnode.dev/leetcodejs-2619-array-prototype-last?utm_source=hashnode&utm_medium=feed)

문제 https://leetcode.com/problems/array-prototype-last/description/ prototype object Array this 풀이 전체 코드 interface Array<T> { last(): T | -1; } Array.prototype.last = function() { if(this.length < 1) return -1 return this\[this.length...

Jan 4 · 1 min read · studio-pendant.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[Donghan Kim](https://hashnode.com/@pendantK)

@pendantK · Suwon-si, Korea

  
[View profile](https://hashnode.com/@pendantK)

Web / iOS / Flutter Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
