SHARE
TWEET

Untitled

a guest Jul 17th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Helper function that allows you run debugger on a function when it is passed
  2.  
  3. const runDebugger = func => {
  4.     debugger;
  5.     func();
  6. }
  7.  
  8. // Test case: Debugg a named function that has a forEach and Array
  9.  
  10. runDebugger(function logItems() {
  11.     let arr = ['cinco', 'seis', 'siete'];
  12.     arr.forEach(item => {
  13.         return console.log(`This is my item: ${item}`);
  14.     });
  15. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top