Interview question of JavaScript