what is a promis in JS code example
Example: making promises in js
getData()
.then(data => console.log(data))
.catch(error => console.log(error));
getData()
.then(data => console.log(data))
.catch(error => console.log(error));