I was reading this smooth CoffeeScript book and it had a code
confirm 'Shall we, then?', (answer) -> show answer
This is supposed to get the answer from the confirm and show it / I changed the ‘show’ to console.log and it doesn’t seem to execute it. what am I missing.
thanks
confirm()doesn’t take a callback. Unless this guy made his own confirm function, that won’t work. The cs for that compiles toconfirm()returnstrueorfalse, so you can just use it as a conditional.