Decimal number to binary number conversion in JavaScript
Comment says, that function will return a string, and then returns a number.

if (decimalNumber === 0) return 0


Best improvement would be using a native method

function getBinaryNumber(num, sep) {
    if (typeof num != "number") num = parseFloat(num)
    return sep ? num.toString(2).split("").join(sep) : num.toString(2)
}


I would remove separator parameter, as it makes no sense to combine this functionality.

function getBinaryNumber(num) {
    return (typeof num == "number" ? num : parseFloat(num)).toString(2)
}