Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Change output formatting #588

Open
Theeverydayman opened this issue Nov 3, 2023 · 3 comments
Open

[Question] Change output formatting #588

Theeverydayman opened this issue Nov 3, 2023 · 3 comments

Comments

@Theeverydayman
Copy link

Hey, is there a way to change the number of characters displayed in the output? [is there even a limit there?]

I'm having a weird issue - I'm creating a jagged array of 1s. How I imagine it should display it in the output [single line]:

[[1,1,1],[1,1,1],[1,1,1]]

or [multiple lines, one for each inner array]:

[
 [1,1,1,1],
 [1,1,1,1],
 [1,1,1,1]
 ]

Instead it displays it like this:

 [
 [1,1,
 1,1],
 [1,1,
 1,1]
 ]

Kind of looks like there's a set max line width of some sort in the output, or is there another reason it's cutting the inner arrays in half?

Here's the code:

let map : any[] = [];

for (let i = 0; i < 10; i++)
{
    let row : number[] = [];
    for (let j=0; j<10; j++)
        {
            row.push(1);
        }
    map.push(row);
    row = [];
}

console.log(map);
@lukehaas
Copy link
Owner

@Theeverydayman what version of RunJS are you using?

@Akawgan
Copy link

Akawgan commented Nov 24, 2023

Latest, at the time of writing (secondary gh)

@lukehaas
Copy link
Owner

I'm not able to replicate the issue. For me, the formatting looks like this:

  [
    1, 1, 1, 1, 1,
    1, 1, 1, 1, 1
  ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants