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
30
var assert = require('assert');
function numOfPlanes(grid) {
// fill this in
return grid;
}
const planeMatrix1 = [
['.', '.', '.', 'P'],
['.', '.', '.', 'P'],
['P', 'P', '.', 'P'],
['.', '.', '.', 'P'],
];
try {
assert.equal(numOfPlanes([]), 0);
console.log('PASSED: ' + 'assert.equal(numOfPlanes([]), 0)');
} catch (err) {
console.log(err);
}
try {
assert.equal(numOfPlanes(planeMatrix1), 2);
console.log('PASSED: ' + 'assert.equal(numOfPlanes(planeMatrix1), 2)');
} catch (err) {
OUTPUT
Results will appear here.