Skip to content

Commit 9f6ed9c

Browse files
authored
Update 12-output.md
1 parent 23b25e2 commit 9f6ed9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

notes/English/12-output.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
console.log() is a function in JavaScript that is used to log messages to the browser's developer console. It is commonly used for debugging and testing purposes, as it allows developers to see the output of their code in real time. The function takes one or more arguments, which can be strings, variables, or expressions, and prints them to the console. For example, console.log("Hello World") would print the string "Hello World" to the console.
66
For example:
77

8-
```
8+
```javascript
99
console.log("learnjavascript");
1010
```
1111

@@ -18,7 +18,7 @@ It is mainly used during the development phase to check the output of some code
1818
For example, document.write("Hello World") would write the string "Hello World" to the current document, and document.write("<p>Hello World</p>") would write a paragraph element containing the string "Hello World" to the current document.
1919
For example:
2020

21-
```
21+
```javascript
2222
document.write("Hello....");
2323
```
2424

@@ -29,7 +29,7 @@ window.alert() is a method in JavaScript that is used to display a dialog box wi
2929
Alert boxes are typically used for notifications, warnings, and error messages. They are generally considered to be disruptive to the user experience and should be used sparingly. Other methods of displaying notifications such as using the browser's notification API or using a custom made notification component are generally more user friendly
3030
For example:
3131

32-
```
32+
```javascript
3333
window.alert("Hello...");
3434
```
3535

@@ -42,6 +42,6 @@ For example:
4242

4343
if you have an HTML element with an id of "example":
4444

45-
```
45+
```javascript
4646
document.getElementById("test").innerHTML = "<b>Hello World</b>";
4747
```

0 commit comments

Comments
 (0)