ES5 ?? code: https://github.com/QuodAI/tutorial-react-twitter-api-login/blob/main/express/src/lib/oauth-promise.js#L4
I just wanted to know the terminology? I did not find any on searching
This is commonjs
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator
https://nodejs.org/api/modules.html#moduleexports
In that they are using require(filepath)(callbackFunc) what is this syntax called? Any specific name?
double.js module.exports = (num) => { return num * 2; } index.js const result = require("./double")(4) //8 //or const double = require("./double"); const result = double(4) //8
How would to use it?
You'll know if you open that link
You got me xd
Wow whats this syntax?
You have never used NodeJS?
Used but seeing this syntax first time. 😅
Is there any specific name or term for it? I want to see few more examples
Обсуждают сегодня