Using Reduce Method Javascript Documentation Tutorialspoint