Skip to content

Commit

Permalink
Merge pull request #32 from pimolo/patch-1
Browse files Browse the repository at this point in the history
Remove the answer
  • Loading branch information
palashmon authored Sep 28, 2018
2 parents 8ec47cb + 28a4a45 commit 62ef4e1
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions 02 - Arrow functions/arrow-functions-this.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,6 @@ <h2>Wes Bos</h2>
</div>

<script>
const box = document.querySelector('.box');
box.addEventListener('click', function() {
let first = 'opening';
let second = 'open';

if(this.classList.contains(first)) {
[first, second] = [second, first];
}

this.classList.toggle(first);
setTimeout(() => {
console.log(this);
this.classList.toggle(second);
}, 500);
});
</script>

</body>
Expand Down

0 comments on commit 62ef4e1

Please sign in to comment.