Client script not working with numbers, does work with character

I have a client script that is working with a character variable, but not with a numeric.
This works
cur_frm.cscript.custom_after_save = function(doc) {
if (cur_frm.doc.qs_code_aangemaakt == “No”){
var rij = “0”;
msgprint(rij);
}
};
This doesn’t
cur_frm.cscript.custom_after_save = function(doc) {
if (cur_frm.doc.qs_code_aangemaakt == “No”){
var rij = 0;
msgprint(rij);
}
};

What am I doing wrong?

Hi @Rudi_Meylemans,

Please apply it.

frappe.ui.form.on('Your DocType', {
    after_save: function(frm) {
        var a = "0";
        var b = 0;
        console.log("a -> ",a);
        console.log("b -> ",b);
        // Please check in the console.
    }
});

we tested so both sides worked.

Thank You!