Search code examples
javascriptconsoleperspective

Why does this show in web console compiler and how to fix it and find the value


This This might sound out of of context but, does anyone know why this 2 is showing, anytime this happens I tends to have wrong data. Is there anyway to see the data that is shown there.

If someone is curious about the code, it is basically a recursive function.

  (function postRow() {
        if (state == "run") {
              table.update(update_motor());

        }
        requestAnimationFrame(postRow);
        // setTimeout(postRow, 20);

  })();

The image shows the result I am talking about. The location that "2 appears.


Solution

  • The "2" means that it is a duplicate. You can turn it off in Chrome dev tools by going to Settings > Preferences > Console and uncheck Group similar I believe.

    Edited:

    Found a similar post, here is the correct answer