Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 729 Bytes

_2667. Create Hello World Function.md

File metadata and controls

42 lines (30 loc) · 729 Bytes

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : July 09, 2024

Last updated : July 09, 2024


Related Topics : N/A

Acceptance Rate : 81.75 %


Solutions

JavaScript

/**
 * @return {Function}
 */
var createHelloWorld = function() {
    
    return function(...args) {
        return 'Hello World'
    }
};

/**
 * const f = createHelloWorld();
 * f(); // "Hello World"
 */