When i am calling function in console why it is showing error and how callback function is working

HTML Code
https://drive.google.com/file/d/1iQnyw0F3LSlMh7Iz3j3STqwSIwJT60-U/view?usp=sharing

JS code
https://drive.google.com/file/d/1C96ThFjNtILQlD6BhEf_vkmrnQ5UnW40/view?usp=sharing