That function is only available on devices with a watch battery.
The RAK8212 powers the nRF52832 via a voltage regulator, so the voltage on it will always be 3.3v - you can't work out the battery voltage that way.
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
That function is only available on devices with a watch battery.
The RAK8212 powers the nRF52832 via a voltage regulator, so the voltage on it will always be 3.3v - you can't work out the battery voltage that way.