I'm currently reading 'Javascript: The Definitive Guide' and I have a question in relation to the asynchrony of the await keyword. In the book it states 'think of the await keyword as a marker that breaks up a function body into seperate synchronous chunks'. I presumed the only purpose of this would be to run each of them concurrently.
But in relation to the below example, the book states that 'fetching of the 2nd URL will not begin until the first fetch is complete'. And so I'm a bit confused as both statements seem contradictory. Any help would be appreciated. Thanks
let value1 = await getJSON(url1);
let value2 = await getJSON(url2);