How to detect iPad and iPad OS version in iOS 13 and Up? : <p>I can detect iOS 13 on iPhone but in iPad OS 13 <code>navigator.platform</code> comes as MacIntel. So it is not possible to get iPad identified using below code, but it works perfectly on iPhone.</p>

<pre><code>    if (/iP(hone|od|ad)/.test(navigator.platform)) {
            var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
            var version = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
            return version;
    }
</code></pre>

<p>When we request for mobile website using the browser on iPad <code>navigator.platform</code> returns as iPad and works perfectly.</p>

<p>Can anyone suggest a way to identify <strong>iPad running on iOS 13 and up</strong> using Javascript?</p>
