Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 19, 2020 10:30 pm GMT

console.log({ myVariable });

I think this might be my most popular tweet of all time, but I’m not sure how to verify that these days. I’ll restate this neat little trick here because blogging is cool and fun.

I used to do this a lot while debugging JavaScript:

console.log("myVariable: ", myVariable);

But now I do this because it’s just easier to type quickly:

console.log({ myVariable });

And you don’t miss out on anything in DevTools:

Now that this is a blog post, I … Read article “console.log({ myVariable });”


The post console.log({ myVariable }); appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.


Original Link: https://css-tricks.com/console-log-myvariable/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks