Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. const myCallbackTest = (callback) => {
  3.     callback(undefined,[1,2,3]);
  4.     console.log("This will be printed before anything")
  5. }
  6.  
  7. //First type of callback passed.
  8. myCallbackTest((hola,chao) => {
  9.     if (hola) {
  10.         return console.log(hola);
  11.     }
  12.     console.log(chao);
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement