moving all labs to old dir
This commit is contained in:
11
old/lectures/lec6/part1/task5.js
Normal file
11
old/lectures/lec6/part1/task5.js
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
const paragraphs = ['C++', 'C#', 'JavaScript'];
|
||||
const textDiv = document.getElementById('text');
|
||||
|
||||
let elemLink = textDiv.firstElementChild;
|
||||
paragraphs.forEach(paragraph => {
|
||||
const p = document.createElement('p');
|
||||
p.innerHTML = paragraph;
|
||||
textDiv.insertBefore(p, elemLink);
|
||||
elemLink = elemLink.nextElementSibling;
|
||||
});
|
||||
Reference in New Issue
Block a user