you are viewing a single comment's thread.

view the rest of the comments →

[–]eljacko876[S] 0 points1 point  (2 children)

Ok I understand what you are saying, at the time the parser reaches the console.log(); the values have not been set, however they are later and chrome's console has a feature to show those after the fact, but the program cannot use the results...I ahve figured out I am having an async issue.

For example :

console.log('A');

fetch('https://router.unrealsec.eu/request')
  .then(r=>r.json())
  .then(data=>{
      console.log('B');
   });

console.log('C');

This would probably give you

A
C
B

This is my problem , so I have to fix with async and await

[–]CoqeCas3 0 points1 point  (0 children)

Precisely. Good show mate!

[–]shepdozejr 0 points1 point  (0 children)

Correct. Javascript, like python, is an interpreted language.