Shortcut to commenting in HTML and CSS in VS Code

Опубликовано: 04 Декабрь 2022
на канале: Anton Scheving
8,502
79

Here are a few reasons you’d want to comment on sections of code in your file.

It's not right yet, and you'll un-comment it when it's ready.
You are temporarily commenting it out to change the behaviour while debugging.
You're not sure if the code is needed, but don't want to delete it until you've tested some more.
The code is needed for some software versions, but not this one.
The code is obsolete, but it took ages to write, and you're emotionally attached to it. Besides, it might be useful one day.
The problem comes when you put the code to bed and then come back to it a couple of years later to do some maintenance. You will find the codebase littered with commented out code. It will no longer be clear why any of it is there, and it's now just clutter.

Here is a great article about commenting. https://www.elegantthemes.com/blog/wo...

Get 50% off on lifetime access to Divi theme by Elegant themes.
Contact me at AntonScheving.com to learn more.

Need blazing-fast web hosting for your new site?
Get 50% off your first year With Native Legacy web hosting.
Pay monthly or annually.
Visit https://AntonScheving.com to learn more.

#shorts