AlgoDaily Solution
1Locked, only available for premium members.
Community Solutions
Community solutions are only available for premium users.
Access all course materials today
The rest of this tutorial's contents are only available for premium members. Please explore your options at the link below.
xxxxxxxxxx
27
var assert = require('assert');
function getMinimum(nums) {
// fill this in
return nums;
}
try {
assert.equal(getMinimum([6, 7, 8, 0, 1, 2, 3, 4, 5]), 0);
console.log(
'PASSED: ' + '`getMinimum([6, 7, 8, 0, 1, 2, 3, 4, 5])` should equal `0`'
);
} catch (err) {
console.log(err);
}
try {
assert.equal(getMinimum([6, 7, 8, 9, 10, 3, 4, 5]), 3);
console.log(
'PASSED: ' + '`getMinimum([6, 7, 8, 9, 10, 3, 4, 5])` should equal `3`'
);
} catch (err) {
console.log(err);
}
OUTPUT
Results will appear here.