js code review