1Add a file named .jshintrc to your project and inside this file type this.
2
3{
4 "esversion": 6
5}
6
1let button = document.createElement('button');
2 button.textContent = 'Like';
3 document.body.appendChild(button);
4 button.addEventListener('click', () => {
5 if (button.textContent === 'Like') {
6 print('Liked!');
7 } else {
8 print('Like');
9 }
10 });
11}