javascript
const sayHello = word => console.log(word);
const func = callback => {
console.log('This is executed after sayHello is called');
return callback;
}
func(sayHello('hello'));
Execution result
hello
Here say_Executed after something is called
python
def say_something(word):
print(word)
def func(callback):
print('Here say_Executed after something is called')
return callback
func(say_something('hello'))
Execution result
hello
Here say_Executed after something is called
Recommended Posts