Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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?