# Js map function halt

**URL:** <https://discourse.mozilla.org/t/js-map-function-halt/96265>\
**Category:** Firefox Development\
**Tags:** issue\
**Created:** [April 21, 2022, 11:46am UTC](https://discourse.mozilla.org/t/js-map-function-halt/96265 "2022-04-21T11:46:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Mlich](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@Peter\_Mlich](https://discourse.mozilla.org/u/Peter_Mlich)\
**Post date:** [April 21, 2022, 11:46am UTC](https://discourse.mozilla.org/t/js-map-function-halt/96265/1 "2022-04-21T11:46:47Z")

</div>

JS. How can i stop array.map() cycle?  
I do time statistic. Need stop, if cycle in function get too lot time to work (500ms). I need use map, because need similar with code another page. Other function can change too other times for smaller maps. Or, i can wait 18s to complete 🙂
