0
Javascript
I don't understand different between call case 1 and case 2 , pro can help me ! Thank you so much. var higher = looger => messsage => { looger(messsage.toUpperCase() + "!!!!") } var messages = message => console.log(message) // case 1 var mess = higher( messages ) mess("hao") // HAO!!! // case 2 higher(messages("hao")) // hao not print Hao!!!
1 Answer
0
not print nothing because (in 2 case) higher not was called ,but if you call higher will be generate a error that not is applicable the toUpperCase method to an undefined value ,this because you call the messages that not return any string she only print your message.