result = newData.reduce((p,r) => arrayAddFirst(r, p), []); virtual hug if you can guess what it does
I'd say it reverses the order of the elements.
for(var j = 0; j < i; i++) Notice how easy it is to see it will run n * (n+1) / 2 times
To me, it is easy to see it is an infinite loop :'D With j++, it would run 0 + 1 +...+ n-1 times. Thus, n*(n-1)/2 times.
This article is a simple tutorial to memory leak & its analysis in a web browser =) I used Firefox 60 instead of Chrome without any hassle.
Thank you !
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd say it reverses the order of the elements.
To me, it is easy to see it is an infinite loop :'D
With j++, it would run 0 + 1 +...+ n-1 times. Thus, n*(n-1)/2 times.
This article is a simple tutorial to memory leak & its analysis in a web browser =) I used Firefox 60 instead of Chrome without any hassle.
Thank you !