Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Disable section of script while testing

Avatar

Level 9

Is there a way to disable a section of script so you can test other sections? I know you can enter "//" but that requires entering at the start of each and every line of code. Is there a way to enter something at the start of a section and the end of that section that would disable it from running?

1 Accepted Solution

Avatar

Correct answer by
Level 10

To comment out multiple lines in JavaScript use /* and */.

/*

inactive code - Attention: this section must not have comments // included

*/

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

To comment out multiple lines in JavaScript use /* and */.

/*

inactive code - Attention: this section must not have comments // included

*/