From 97d335b1ce7f50748b06798281ba4657d67b0c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Chac=C3=B3n=20Guti=C3=A9rrez?= <138903866+joseantoniochacon@users.noreply.github.com> Date: Thu, 13 Jun 2024 20:09:55 -0600 Subject: [PATCH] Time: 61 ms (5.79%), Space: 48.8 MB (37.23%) - LeetHub --- .../2667-create-hello-world-function.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 2667-create-hello-world-function/2667-create-hello-world-function.js diff --git a/2667-create-hello-world-function/2667-create-hello-world-function.js b/2667-create-hello-world-function/2667-create-hello-world-function.js new file mode 100644 index 0000000..15d24d9 --- /dev/null +++ b/2667-create-hello-world-function/2667-create-hello-world-function.js @@ -0,0 +1,14 @@ +/** + * @return {Function} + */ +var createHelloWorld = function() { + + return function createHelloWorld(...args) { + return "Hello World"; + } +}; + +/** + * const f = createHelloWorld(); + * f(); // "Hello World" + */ \ No newline at end of file