I am writing code for a simple electron based application, while working with a list of directory array its started acting weird!
Take a look at this picture:
At first when i console.log( dirs )
it displays all of its array elements in the console, but while using the length
it show it has 0 elements! Which is not true.
Again in the loop its not traversing!
Also I am not using push
method to insert new objects and arr.slice()
also returns 0 array elements!
Am i missing something here?