Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is console.log not working inside .each?

I tried doing the following:

$('.not-following').each(function(i, obj) { 
      console.log('test');
});

for some reason it keeps on printing the obj instead of test. Any reason why this is? I tried running this on here

like image 210
adit Avatar asked Jan 28 '26 02:01

adit


1 Answers

They overwritten console

> console.log.toString()
"function (){}"
like image 57
epascarello Avatar answered Jan 29 '26 15:01

epascarello



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!