Okay. Sorry about that, and no problems at all with you saying so! Always feel free to say something wasn't answered.
Following's a bit long, so a heads up.
Will try to explain again, directly addressing your post.
can you please explain what is the purpose of this function and what is "confirmToGo"
Will explain what it does, not really its purpose first.
// confirmRide takes 1 parameter, confirmToGo .
// confirmToGo is a function.
// confirmRide calls the confirmToGo function and returns
// confirmToGo's return value
confirmToGo's purpose? pedagogical, and answered in my previous post
Functionally, it's not needed, and is redundant.
where does [confirmToGo] come from or where is it defined?
It's a parameter, so is supplied when confirmRide is called.
In the example solution at the top of this topic, it is provided in the line
var startRide = confirmRide(fearMessage);
fearMessage, which is a function, is passed to
confirmRide , via
fearMessage, and returns the return value from
It's result-wise equivalent to
var startRide = fearMessage();
Let me know if that's not clear. It is long, but I think if you go through my answer a couple times, you'll understand what's happening. Cheers