Use this tag for questions about features finalized in ECMAScript 2017. Do *not* use this tag if the code in question merely *uses* one of the features, *unless* the feature is cause of the problem.
I am trying to understand why promise is not resolved when I am using async and await keywords. Below is the code that I have
var a = 'https://jsonplaceholder.typicode.com/posts';
async function fetchData() {
const response = await fetch(a);
…
this Question About ECMAScript Specification(ECMA-262 8th edition)
These Days, I'm little confused about Job and Job Queue.
Here is Some Questions.
1: In ECMA-262, There is two kinds of Job Queue. one is ScriptJobs the other is PromiseJobs. So,…
I want to make a get and later a post request with axios (should be async).
Here is the code:
async getJSONAsync()
{
await app.get('https://*****.io/index.php?/api/v2/get_case/5892', {
headers: {'Content-Type' :…
Why do I get error:
"The "url" argument must be of type string. Received type undefined"
when I run this code:
P.S. I also tried to pass in variable with this URL, but the result was the same.
var axios = require('axios')();
module.exports =…
I cannot understand some steps of this CreateGlobalFunctionBinding ( N, V, D ) EcmaScript algorithm.
Could you explain me steps 5, 7 and 9 in this algorithm? I cannot figure out the sense of 9 step because of 7 step. Why is value V setting twice?…
async_hooks were introduced as experimental in Node v8. Because the name is similar to ES2017 async it could appear that they may be in some way related. Are they? If so, in what way (complementary or competing)?
I'm using await within an async function execute functions in a particular order, if you see here - I wanted startAnim to wait until hideMoveUI had finished executing to execute itself.
Though my console log returns:
startAnim
hideMoveUI
My…
I have 2 methods that are almost identical except that one of them is async and returns a promise that resolves promises returned by the callback method and the other one isn't. The 2 functions are really identical, but because the callback is…
I am trying to understand the translation of a string literal to a final String value (consisting of code unit values), following ECMAScript 2017.
Relevant Excerpts
5.1.2 The Lexical and RegExp Grammars
A lexical grammar for ECMAScript is given in…
The below excerpts refer to ECMAScript 2017.
11.8.4.2 Static Semantics: StringValue
StringLiteral::
"DoubleStringCharactersopt"
'SingleStringCharactersopt'
1. Return the String value whose elements are the SV of this…
The below excerpts refer to ECMAScript 2017.
11.8.4 String Literals, Note 1
A string literal is zero or more Unicode code points enclosed in
single or double quotes. Unicode code points may also be represented
by an escape sequence. .... Any…
Sometimes code would like to know if a particular function (or children) are running or not. For instance, node.js has domains which works for async stuff as well (not sure if this includes async functions).
Some simple code to explain what I need…
I have a web application, in which I have two buttons: "start download" and "abort download", that are bind to the methods: start() and stop() accordingly.
1. When the user clicks the "start download" button, the application will loop over an array…
I'm writing some article that about ECMA-262's realm in korean(actually there is no article about realm). So, I read ECMA-262 about realm record.and i can understand about [[Intrinsics]], [[GlobalObject]] and etc.. But, I can't understand about…