An Interest In:
Web News this Week
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
November 19, 2020 10:30 pm GMT
Original Link: https://css-tricks.com/console-log-myvariable/
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:
Tweet
View Full Article