JavaScript cannot detect win10

I use HE4.6.1 to compile an (IE)ebook file on a windows8.1 notebook.
And I use JavaScript to detect windows version.

The eBook file can detect and show up correct windows version while running on winXP, win7, win8 notebook.
However, when the eBook file run on win8.1 or win10, it always show a wrong windows version: “win8”.

My javascript code sample:
var OSName=“Unknown OS”;
if (navigator.appVersion.indexOf(“Windows NT 10.0”)!=-1) OSName=“Win10”;
if (navigator.appVersion.indexOf(“Windows NT 6.3”)!=-1) OSName=“Win8.1”;
if (navigator.appVersion.indexOf(“Windows NT 6.2”)!=-1) OSName=“Win8”;

Please first upgrade to the last version available for full Windows 10 support.