javascript ::after click event

In JavaScript, there are multiple ways of doing the same thing. The