How To Use Reduce In Javascript Array Of Strings In C