Js code problem?

    const jcado = {};
                  jcado.arr = [];
                  line.rows.forEach((lineCell) => {
                    const jcados = {};
                    lineCell.forEach((cell) => {
                      if (cell.name.indexOf("") > 0) {
                        jcados[cell.name] = cell.content.replace("T", " ");
                      } else if (cell.content === "(null)") {
                        jcados[cell.name] = "-";
                      } else if (cell.content === "") {
                        jcados[cell.name] = "-";
                      } else {
                        jcados[cell.name] = cell.content;
                      }
                    });
                    console.log("jcados", jcados);
                    jcado.arr.push(jcados);
                    console.log("jcado", jcado);
                    console.log("jcado.arr", jcado.arr);

Why does the jcado print in this code, where arr is empty, but print jcado.arr contains content?

Mar.31,2022

because what is printed is not a snapshot of the object, but a reference to the object


MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a80c-4125d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a80c-4125d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?