struggling to try and explain this last bit of JavaScript in a easy way