MyKaarma interview question

what are callbacks in js? what is hoisting? How do you implement undo feature in online code editor?