5 ms·
I think they mean: function addStuff(a, b) { return a + b; } function logFunction() { console.log(addStuff); } logFunction(); And have it lo
by ajanuary 4y ago
I think they mean:
function addStuff(a, b) {
return a + b;
}
function logFunction() {
console.log(addStuff);
}
logFunction();
And have it log out that `addStuff` is defined on line 1.
- WorldMaker 4y agoIn Edge Dev Tools (so I'm sure it is similar in Chrome Dev Tools) it doesn't show source/line information in the log message directly (though it does have a link to the source line for the console.log message on the far right), but right-clicking a logged function includes a context menu choice for "Show function definition" which will jump to addStuff's declaration on line 1.