Skip to content
Permalink
master
Switch branches/tags
Go to file
1 contributor

Users who have contributed to this file

8 lines (7 sloc) 228 Bytes
let array = ['Chris', 'Bob', 'Mark', 'Paul'];
// Arrow function syntax
array.forEach((e, i, a) => {
const elem = document.createElement('p');
elem.textContent = (i + 1) + '. ' + e;
document.body.appendChild(elem);
});