Published on January 26, 2024By DeveloperBreeze
function isMobileDevice() {
const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
return mobileRegex.test(navigator.userAgent);
}
console.log('Is Mobile Device:', isMobileDevice());
Comments
Please log in to leave a comment.