Check if the current user is on an Apple device

PHOTO EMBED

Mon Jan 25 2021 14:18:09 GMT+0000 (Coordinated Universal Time)

Saved by @aymanelya #javascript

const isAppleDevice = /Mac|iPod|iPhone|iPad/.test(navigator.platform);
console.log(isAppleDevice);
// Result: will return true if user is on an Apple device
content_copyCOPY

https://radiant-brushlands-42789.herokuapp.com/medium.com/dailyjs/13-javascript-one-liners-thatll-make-you-look-like-a-pro-29a27b6f51cb