i have this if else statement that always return ( other than 0 ) 'hey', but when the condition == 0, it will not display the 'ho' value. Appreciate advice. Thanks.
$('#icNumber').on('change', function(){
let num = $(this).val().substr(13,1) %2
if(num){
$('#tortrix')
.removeClass('d-none')
.addClass('d-block form-control animated fadeIn')
.attr('value', function(i, oriVal){
if(num == 0) {
console.log('ho')
return 'value','Testatrix';
} else {
console.log('hey')
return 'value','Testator';
}
})
}
else if (num == "") {
$('#tortrix').removeClass('d-block').addClass('d-none')
}
})