mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-22 09:00:44 -04:00
Explained why you may want to comment code out. (#21204)
* Explained why you may want to comment code out. * Update index.md
This commit is contained in:
@@ -53,7 +53,7 @@ function addTwoNumbers(num1, num2) {
|
||||
}
|
||||
console.log(addTwoNumbers(10,20)) // will print 30 in the console.
|
||||
|
||||
You can also prevent execution of Javascript code just commenting the code lines like this:
|
||||
In some cases you may want to prevent code from running for debugging purposes. For example:
|
||||
```javascript
|
||||
function hello() {
|
||||
/*console.log("Hello world!");*/
|
||||
|
||||
Reference in New Issue
Block a user