JSFiddle - React, Tailwind, and code Playground

by Marventus

HTML

<p>Result: <strong></strong></p>
<button id="test">Test UA</button>

JavaScript

$(document).ready(function() {
    $('#test').click(function() {
        var ua = navigator.userAgent.toLowerCase(),
            out = ua.match(/chrome/);
        console.log(out);
        $("strong").text(out == null ? "Not found!" : out);
    });
});