Infosys Interview Question

Write a custom hook to return a boolean value.