Using Reduce Method Javascript Documentation Tutorial Photoshop