It’s my understanding that you can use a function as an argument when invoking a function. I’m clearly doing it wrong. Can someone help me to understand what I’m doing wrong here? I thought if I invoked functionTwo
with functionOne
as an argument, then it would log “hi” to the console?
let functionOne = (a) => {
console.log('hi');
};
let functionTwo = (b) => {};
functionTwo(functionOne);