
Basic JavaScript Device Detection (opens in a new tab)
A beginner-friendly experiment that uses JavaScript user-agent checks to identify possible phones, tablets and desktop computers. Explore variables, simple conditions and displaying results on a page.
- HTML
- JavaScript
What I explored
Learn how to read navigator.userAgent, check text patterns and display a message using if / else if. Understand why these results are estimates rather than reliable device identification.
