... also i believe you're not using getIP correctly - the first argument is the callback is the error or null, second is the ip - as functions tend to be done in node.js
... so even if it did work, you would never see the IP in addr.
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.
... also i believe you're not using getIP correctly - the first argument is the callback is the error or null, second is the ip - as functions tend to be done in node.js
... so even if it did work, you would never see the IP in addr.