{
"data": {
"question": {
"questionId": "2809",
"questionFrontendId": "2667",
"boundTopicId": null,
"title": "Create Hello World Function",
"titleSlug": "create-hello-world-function",
"content": "Write a function createHelloWorld
. It should return a new function that always returns "Hello World"
.\n
\n
Example 1:
\n\n\nInput: args = []\nOutput: "Hello World"\nExplanation:\nconst f = createHelloWorld();\nf(); // "Hello World"\n\nThe function returned by createHelloWorld should always return "Hello World".\n\n\n
Example 2:
\n\n\nInput: args = [{},null,42]\nOutput: "Hello World"\nExplanation:\nconst f = createHelloWorld();\nf({}, null, 42); // "Hello World"\n\nAny arguments could be passed to the function but it should still always return "Hello World".\n\n\n
\n
Constraints:
\n\n0 <= args.length <= 10
Node.js 16.13.2
.
Your code is run with --harmony
flag, enabling new ES6 features.
lodash.js library is included by default.
\\r\\n\\r\\nFor Priority Queue / Queue data structures, you may use 5.3.0 version of datastructures-js/priority-queue and 4.2.1 version of datastructures-js/queue.
\"], \"typescript\": [\"Typescript\", \"TypeScript 5.1.6, Node.js 16.13.2
.
Your code is run with --harmony
flag, enabling new ES2022 features.
lodash.js library is included by default.
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }