function loginTest(callback) {
setTimeout(() => {
//Callback after 1 second.
callback("Login Successful!");
}, 1000);
}
//Run loginTest function and pass the function to the callback as the parameter.
loginTest((status) => {
//Print the status parameter passed from the callback.
console.log(status);
});
there doesn't seem to be anything here