if (typeof sum === 'function') {
console.log('sum function is defined');
} else {
console.log('sum function is not defined');
}
function toBinArray(arr) {
}
if (typeof toBinArray === 'function') {
console.log('toBinArray function is defined');
} else {
console.log('toBinArray function is not defined');
}
/*
run:
"sum function is not defined"
"toBinArray function is defined"
*/