Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Helper function that allows you run debugger on a function when it is passed
- const runDebugger = func => {
- debugger;
- func();
- }
- // Test case: Debugg a named function that has a forEach and Array
- runDebugger(function logItems() {
- let arr = ['cinco', 'seis', 'siete'];
- arr.forEach(item => {
- return console.log(`This is my item: ${item}`);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement