Rayonit interview question

Q: How do you use a Promise in Javascript for frontend development.