We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cff100 commit c32a7f8Copy full SHA for c32a7f8
Create Hello World Function
@@ -0,0 +1,25 @@
1
+/**
2
+ * @return {Function}
3
+ */
4
+
5
+/*
6
+ Example 1:
7
+ Input: args = []
8
+ Output: "Hello World"
9
+ Explanation:
10
+ const f = createHelloWorld();
11
+ f(); // "Hello World"
12
13
+ The function returned by createHelloWorld should always return "Hello World".
14
+*/
15
16
+// var createHelloWorld = function() {
17
+// return () => "Hello World";
18
+// };
19
20
+const createHelloWorld = () => () => "Hello World";
21
22
23
+ * const f = createHelloWorld();
24
+ * f(); // "Hello World"
25
0 commit comments