Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

const only means the variable itself can't be reassigned though, and really the main complain about mutation comes from Array methods. Like Array.pop will mutate the array and you have to do an Array.split for the last item instead if you want to keep your array.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: