DEV Community

Calvin
Calvin

Posted on

Making Your Own IsOdd Function

var num = 0;
var isOdd = function (num){

if (num % 2 !== 0){

return true
Enter fullscreen mode Exit fullscreen mode

} else {

return false
Enter fullscreen mode Exit fullscreen mode

}

}

Top comments (0)