Skip to content

Commit 79adc18

Browse files
author
Carlos
committed
Refactor variable declaration and comment sections
1 parent e03288e commit 79adc18

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/cheatsheet/basics.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ JavaScript provides seven different data types:
3434

3535
## Variables
3636

37-
In JavaScript, you can declare variables using `var`, `let`, and `const` keywords. Here's what you need to know about each:
37+
You can declare variables using `var`, `let`, and `const` keywords. Here's what you need to know about each:
3838

3939
1. `var`: This is the oldest way to declare variables. It's not used as much in modern JavaScript, but it's still important to understand. Variables declared with var are function-scoped, meaning they are only available within the function they're declared in.
4040

@@ -351,7 +351,7 @@ These operators are less commonly used than the arithmetic, assignment, comparis
351351
352352
## Comments
353353
354-
In JavaScript, you can write comments in your code to explain what it does, leave notes for yourself or others, or to prevent execution of code. There are two types of comments in JavaScript:
354+
To write comments in your code to explain what it does, leave notes for yourself or others, or to prevent execution of code:
355355
356356
### Single-line comments
357357
@@ -383,7 +383,7 @@ It can span multiple lines
383383
384384
## The console.log Function
385385
386-
The `console.log()` function in JavaScript is used to print output to the console. This can be very useful for debugging, as it allows you to output the values of variables at different points in your code, or to output messages that help you understand the flow of execution in your code.
386+
The `console.log()` function is used to print output to the console. This can be very useful for debugging, as it allows you to output the values of variables at different points in your code, or to output messages that help you understand the flow of execution in your code.
387387
388388
```javascript
389389
console.log("Hello, World!"); // prints "Hello, World!" to the console
@@ -412,4 +412,3 @@ console.log(a, b); // prints "1 2" to the console
412412
Note that `console.log()` does not affect the execution of your code. It's purely for outputting information to the console.
413413
</base-warning-content>
414414
</base-warning>
415-

0 commit comments

Comments
 (0)