addEventListener adds tracking
of any eventthat indicates a onclick - only clicks. So what to use depends on the task.
In addition, the second method allows you to hang only one event handler (the following will peristerite previous), while the first - indefinitely.