In my nodeJS server I've got the following:
console.log(socket.geoData.hostname + socket.geoData.uri + ": " +
socket.geoData.country +
(socket.geoData.city != "false" ? ", " + socket.geoData.city : false)
);
But if condition fails it is actually appending the word false and not simply doing nothing. In PHP, I could return false and nothing would be appended. How can I achieve that here?