I’m working in a little game and when accesing an array with text, it’s return me true. The array content is the same to its previous value and when I try to acces it it return the text
I can`t upload all the code but here is the array
export const universityEvents = [
{
id: 'universityEntry',
position: 0, //to localice the event
currentDialog: 0,
content:[
{
currentPhrase: 0,
content: [
['Jesús', `Even with the pandemic, the hard teachers,the incredible stress, the brutal anxiety`],
['Jesús',`The two hours in bus that took to get here, the high cost of the fees`],
['Jesús', `Some unpleasant colleagues, and the bureaucracy...`],
['Jesús', `My college years were some of the best of my life`],
],
},
{
currentPhrase: 0,
content: [
['Jesús', `But it's time to look forward, now I have two degrees and i have to get a job`]
]
}
]
}
]
And here the code in what I’m accesing (event data is a copy of universityEvents):
//get content
let numberofPhrase = eventData[dataPosition].content[currentDialog].currentPhrase
actualPhrase = eventData[dataPosition].content[currentDialog].content[0]
console.log(actualPhrase)
I tried to acces with [0], [1],[2] and in all the cases with 0 and 2 display the text but in one returns true. It’s something about the content that i dont know? why this happens
Edit: I’ve create a repository for the code, the array its in data/universityEvents, the scene with the code its scenes/university scene: GitHub repository