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