Multiplying and adding big numbers represented with strings
Use the correct functions to convert to types

I think you are using the bitwise | to convert a string to a number:

if ((a | 0) == 0 || (b | 0) == 0) {
    return '0';
}


I think parseInt can show this intent more clearly:

if (parseInt(a) == 0 || parseInt(b) == 0) {
    return '0';
}