xxxxxxxxxx
62
var assert = require('assert');
function productExceptSelf(numArray) {
// fill this in
return numArray;
}
try {
assert.deepEqual(productExceptSelf([]), []);
console.log('PASSED: ' + 'productExceptSelf([]) should return []');
} catch (err) {
console.log(err);
}
try {
assert.deepEqual(productExceptSelf([]), []);
console.log('PASSED: ' + 'productExceptSelf([]) should return []');
} catch (err) {
console.log(err);
}
try {
assert.deepEqual(
productExceptSelf([7, 8, 5, 18, 16, 11, 20]),
[2534400, 2217600, 3548160, 985600, 1108800, 1612800, 887040]
OUTPUT
Results will appear here.