magento2.3 – jQuery onchnage function call in magento 2.3


How to use custom js in magento 2.3 add jquery

jQuery('.customdrop select').on('change',function(){
console.log(jQuery('.customdrop select').find(":selected").text));
if (jQuery('.customdrop select').find(":selected").text()==='Other'){
    jQuery('.customfields').show();
} else {
    jQuery('.customfields').hide();
}

});