inline null check javascript

return num || 0;
Pleasant Pigeon