Adding js-functions prime number