<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Functional Archives - Huahua&#039;s Tech Road</title>
	<atom:link href="https://zxi.mytechroad.com/blog/category/functional/feed/" rel="self" type="application/rss+xml" />
	<link>https://zxi.mytechroad.com/blog/category/functional/</link>
	<description></description>
	<lastBuildDate>Sun, 07 May 2023 17:56:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.8</generator>

<image>
	<url>https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/cropped-photo-32x32.jpg</url>
	<title>Functional Archives - Huahua&#039;s Tech Road</title>
	<link>https://zxi.mytechroad.com/blog/category/functional/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>花花酱 LeetCode 2667. Create Hello World Function</title>
		<link>https://zxi.mytechroad.com/blog/functional/leetcode-2667-create-hello-world-function/</link>
					<comments>https://zxi.mytechroad.com/blog/functional/leetcode-2667-create-hello-world-function/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 07 May 2023 17:47:56 +0000</pubDate>
				<category><![CDATA[Functional]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=10049</guid>

					<description><![CDATA[<p>Write a function&#160;createHelloWorld.&#160;It should return a new function that always returns&#160;"Hello World". Example 1: Input: args = [] Output: "Hello World" Explanation: const f =&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/functional/leetcode-2667-create-hello-world-function/">花花酱 LeetCode 2667. Create Hello World Function</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Write a function&nbsp;<code>createHelloWorld</code>.&nbsp;It should return a new function that always returns&nbsp;<code>"Hello World"</code>.</p>



<p><strong>Example 1:</strong></p>



<pre class="wp-block-preformatted;crayon:false"><strong>Input:</strong> args = []
<strong>Output:</strong> "Hello World"
<strong>Explanation:</strong>
const f = createHelloWorld();
f(); // "Hello World"
The function returned by createHelloWorld should always return "Hello World".
</pre>



<p><strong>Example 2:</strong></p>



<pre class="wp-block-preformatted;crayon:false"><strong>Input:</strong> args = [{},null,42]
<strong>Output:</strong> "Hello World"
<strong>Explanation:</strong>
const f = createHelloWorld();
f({}, null, 42); // "Hello World"
Any arguments could be passed to the function but it should still always return "Hello World".
</pre>



<p><strong>Constraints:</strong></p>



<ul><li><code>0 &lt;= args.length &lt;= 10</code></li></ul>



<p>Solution: </p>



<div class="responsive-tabs">
<h2 class="tabtitle">JavaScript</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua
/**
 * @return {Function}
 */
var createHelloWorld = function() {
    return function(...args) {
      return &quot;Hello World&quot;;
    }
};</pre>
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/functional/leetcode-2667-create-hello-world-function/">花花酱 LeetCode 2667. Create Hello World Function</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zxi.mytechroad.com/blog/functional/leetcode-2667-create-hello-world-function/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
