deviceMemory read-only property of the
Navigator interface returns the approximate amount of device memory in gigabytes. This value is an approximation given by rounding down to the nearest power of 2 and dividing that number by 1024. Also, the lower and upper bounds are used to protect privacy of owners of very low- or high-end devices.
A floating point number, one of
const memory = navigator.deviceMemory console.log ("This device has at least " + memory + "GiB of RAM.")
|Device Memory 1
The definition of 'deviceMemory' in that specification.
|Editor's Draft||Initial definition.|