---
title: "Discussion on \"JS: Call stack size exceeded\" | Hashnode"
description: "Discussion on \"JS: Call stack size exceeded\". Some time ago I was working with big arrays of about 2.000.000 elements. One of the operations was to find the maximum value in the array.\nSounds simple, right? We can use Max.max:\nconst arr = new Array(2000000);\n...\nconst max = Math.max(...arr);\n\nHo..."
url: "https://hashnode.com/posts/js-call-stack-size-exceeded/640dd744bcc5b29f3eeaf224"
---

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

Discussion

# [JS: Call stack size exceeded](https://blog.xnim.me/js-call-stack-size-exceeded?utm_source=hashnode&utm_medium=feed)

Some time ago I was working with big arrays of about 2.000.000 elements. One of the operations was to find the maximum value in the array. Sounds simple, right? We can use Max.max: const arr = new Array(2000000); ... const max = Math.max(...arr); Ho...

Mar 12, 2023 · 3 min read · blog.xnim.me  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#spread-operator](https://hashnode.com/tag/spread-operator)
-   [#callstack](https://hashnode.com/tag/callstack)
-   [#call-stack](https://hashnode.com/tag/call-stack)

## Written by

[Nik](https://hashnode.com/@xnim)

@xnim · London, UK

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

SWE@Meta, Whatsapp

Software engineer @Meta, WhatsApp, building secure, e2ee messaging experience for users. ex-HH.ru ex-Program committee member HolyJS conference

## Responses 1

Markdown supported · ⌘↵ to post

[rain84](https://hashnode.com/@rainysky84)

[Apr 22, 2023](https://hashnode.com/posts/js-call-stack-size-exceeded/640dd744bcc5b29f3eeaf224/comment/6443f30ef0bb29340d3ef2ab)

Interesting, thank you.
