phuocng/1loc

Assigning to a new array literal does not empty an array

marlowpayne opened this issue · 1 comments

const empty = arr => arr = [];

This code snippet will not empty the arr argument, as shown below:

Screen Shot 2020-04-24 at 8 25 51 AM

It was my mistake while trying to push many snippets :)
It's fixed now.