Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let box1 = document.querySelector('#box1');
- let b1 = 'text 1';
- let b2 = 'text 2';
- let b3 = 'text 3';
- for (let i = 1; i <= 3; i++) {
- box1.appendChild(document.createElement('h3')).innerHTML = b + i;
- }
Add Comment
Please, Sign In to add comment