I just created index.html file with following content:
<script type="text/javascript">
var markers = [{'dist': 1}, {'dist': 2}, {'dist': 3}];
console.log(markers);
</script>
When console is open (press F12 and select 'Console') and just try to refresh the page multiple times. The output should be same as no dynamic content inside, but it is not.
Usualy I see this:
File: test.html, Line: 1, Column: 1
[object Object],[object Object],[object Object]
[
0: {
[functions]: ,
__proto__: { },
dist: 1
},
1: {
[functions]: ,
__proto__: { },
dist: 2
},
2: {
[functions]: ,
__proto__: { },
dist: 3
},
length: 3
]
but sometimes this:
File: test.html, Line: 1, Column: 1
[object Object],[object Object],[object Object]
[
0: {
undefined: undefined
},
1: {
undefined: undefined
},
2: {
undefined: undefined
},
length: 3
]
Thanks in advance if anyone can shed some light on it.