Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check what browser you are using javascript

// You aren't actually sure what browser they have but you have data on it. I guess
// you could return it and then find it out using 'if' and 'else if' statements
// Anyways, here you go:

// We want to alert the user about what their current browser is.
// We can use the navigator object to get the user's browser.

// Create a variable called browser and set it to the user's browser.
// Then alert the user what their browser is.
const browser = navigator.userAgent;
alert(browser);
 
PREVIOUS NEXT
Tagged: #check #browser #javascript
ADD COMMENT
Topic
Name
6+3 =