Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

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

*/

Avatar

Level 9

Thanks so much!