Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Foundations Variables Scope

Vicky Guttormsen
Vicky Guttormsen
1,648 Points

highight text and comment out in bulk

How did Jim comment out a block of stuff that was highighted please?

2 Answers

Vicky Guttormsen
Vicky Guttormsen
1,648 Points

Many thanks. but i think it was Tom Mertz who replied with CTRL + / on Windows which seems to comment and uncomment blocks of code in one go.

Commenting in JavaScript can take the form of single line comments

// this line would be commented

or multiline comments, which may also appear on one line, but don't have to.

/* this text would be commented */
/*
this text
would also
be commented
*/
/* this text
would be commented as well */

Does that help?