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.
|
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
|
```javascript
|
||||||
function hello() {
|
function hello() {
|
||||||
/*console.log("Hello world!");*/
|
/*console.log("Hello world!");*/
|
||||||
|
Reference in New Issue
Block a user