Problem assining a variable as a 2D vector in js
i was tryng to write a js script to calculate the determinant of a matrix
to do so i created a function to give me a matrix of a specific dimension filled with a certain value.
as i was tryng to debug my unfunctional code i run into a paradox, wich you can experience at line 118.
while creating a 4×4 of zeors js creates a 4×4 whith every rows that starts with a 1.
i tried changing the nature of the variable, the name, and running the same piece of code in other parts of the script, i just wanted a 4×4 filled with zeros.
as you can see in the last line this doesn’t happen in any other part of the code.
can someone please explain what am i doing worng? thanks in advance and sorry for my poor english.