javascript get cpu cores

JavaScript
var cpuThreads = navigator.hardwareConcurrency // integer
// Returns logical CPU cores so called threads
Source

Also in JavaScript: