Incidence Matrix

Tell us what’s happening:
I’m able to pass everything except for the first test, which seems to check for incMatUndirected.length === 5, which my code appears to satisfy. Please advise.

Your code so far


var incMatUndirected = Array.from({length: 5}, el => Array.from({length:5}, el => 0))

incMatUndirected[0][0] = 1;
incMatUndirected[1][1] = 1;
incMatUndirected[0][1] = 1;
incMatUndirected[1][0] = 1;
incMatUndirected[1][2] = 1;
incMatUndirected[2][1] = 1;
incMatUndirected[2][2] = 1;
incMatUndirected[2][4] = 1;
incMatUndirected[4][2] = 1;
incMatUndirected[4][4] = 1;
incMatUndirected[1][3] = 1;
incMatUndirected[3][1] = 1;
incMatUndirected[3][3] =1;

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/coding-interview-prep/data-structures/incidence-matrix