Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04b7f81

Browse files
var replaced with const
1 parent a9c10ff commit 04b7f81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Week1/js-exercises/ex2-aboutMe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ items.forEach(item => {
1010
item.classList = 'list-item';
1111
});
1212

13-
var style = document.createElement('style');
13+
const style = document.createElement('style');
1414
style.type = 'text/css';
1515
style.innerHTML = '.list-item{color:red}';
1616
document.head.appendChild(style);
1717

18-
var img = new Image(200, 200);
18+
const img = new Image(200, 200);
1919
img.src = 'https://cdn1.vectorstock.com/i/1000x1000/51/05/male-profile-avatar-with-brown-hair-vector-12055105.jpg';
2020
document.body.appendChild(img);

0 commit comments

Comments
 (0)