Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
34
var assert = require('assert');
function treatsDistribution(snacks) {
// fill this in
}
console.log(treatsDistribution([2, 2, 3, 3, 4, 4]));
try {
assert.deepEqual(treatsDistribution([2, 2, 3, 3, 4, 4]), 3);
console.log(
'PASSED: ' + 'treatsDistribution([2, 2, 3, 3, 4, 4]) should equal 3'
);
} catch (err) {
console.log(err);
}
try {
assert.deepEqual(treatsDistribution([1, 1, 2, 4]), 2);
console.log('PASSED: ' + 'treatsDistribution([1, 1, 2, 4]) should equal 2');
} catch (err) {
console.log(err);
}
try {
OUTPUT
Results will appear here.