Using Reduce Method Javascript Documentation Tutorialspoint Java