Find Minimum In Array Javascript Push Notifications