Please give an example of JavaScript code demonstrating how to use the returned function