Hello, in this JavaScript video, I am going to show you how to use the navigator in JavaScript to be able to detect capabilities and information of your web browser. So first of all, let's just check it bit of JavaScript is enabled. Now pretty obvious, it won't be enabled if we can even run it, but we can, you know, just check if, you know he supports JavaScript. So, this is the console dot log. So this is will tell us if we support it, we just navigator dot java enabled. To do Sorry, my back it's for Java, not JavaScript.
Huh? My bad so Java now java script, okay. And because it returns to fourth, you can put this directly into a What's the code you know? And this thing, the next one, we're going to check the console dot log navigator.on line online. So let's just check that out. And this is just checking if we are actually on line.
And it says we are online for the branded online I thinking where where could you use this in terms of an actual real world scenario? If you're on a web browser, you're going to be online? Not necessarily what might happen is you might go into the website when you're online, then for some reason, your internet disconnects, maybe you're you accidentally disabled the internet on your computer or something happens to your router. And then you try and do something on your on the web page without reloading it. All. In other words, policy is, of course already been downloaded that's already on, you know, the browser, it's already on the computer.
So you can still trigger all that stuff. But anything that needs online capabilities won't work. So this is great for that. You'll be able to say, okay, no internet. Please try again later, please try refreshing, you know, something along the line, you give that sort of no error message. The next one will show you confident log data, don't do voice, memory.
And then let's run this. So it is saying hey, so this will just tell us the amount of memory our device actually has. Next, I am going to show you the vendor. So this is pretty darn cool. On photo log, nervy Gator So Google Inc. So this is just telling us the number three, the company of our web browser, you can dive deeper, you can get the exact, you know, version number, the exact browser tab is so much information that you can get from this navigator in JavaScript, where I'm going to actually do provide a link so you can see all of the different little pieces of functionality that you can utilize.
There's too much to go through but long as you know, this is essentially the general format. And I look forward to seeing you in the next Java Script programming video.