Why do you need to check? Because some functionality is not run on older browsers like the Internet Explorer (IE). And you want to some tricky with only for that browser. So that’s why you need to check.
To check the Internet Explorer 12+ (Edge)
To check the Internet Explorer 11
To check the Internet Explorer 10 or older
Being Tricky 😉