Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sayFullName(first, last) {
- console.log('hi ' + first + ' ' + last);
- }
- function sayHi() {
- console.log('hi');
- }
- function sayHiTo(name) {
- console.log('hi ' + name);
- }
- function runWithDebugger(callback, optionalArray) {
- debugger;
- if (arguments.length > 1 && Array.isArray(optionalArray)) {
- callback.apply(this,optionalArray);
- } else if (arguments.length > 1 && !Array.isArray(optionalArray)) {
- console.log('The second argument must be an array.')
- } else {
- console.log(arguments.length);
- callback();
- }
- }
- runWithDebugger(sayFullName, ['Roland','Deschain']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement