<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>函数 on 疯狂的技术宅</title><link>https://fe-tech.viewnode.com/tags/%E5%87%BD%E6%95%B0/</link><description>Recent content in 函数 on 疯狂的技术宅</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Thu, 03 Jun 2021 10:00:00 +0800</lastBuildDate><atom:link href="https://fe-tech.viewnode.com/tags/%E5%87%BD%E6%95%B0/index.xml" rel="self" type="application/rss+xml"/><item><title>什么情况下可以使用 JavaScript 中的 Boolean 函数</title><link>https://fe-tech.viewnode.com/post/202106/03/</link><pubDate>Thu, 03 Jun 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202106/03/</guid><description>用 Boolean 进行真实检查 Boolean() 函数在对数据进行真值检查时特别有用，并且可能比双重否定 (!!) 操作更具可读性： let x = &amp;#39;some-value&amp;#39;; // 这看起来不太美观 if (!!x) { // ... } // 这更具可读</description></item><item><title>关于 JavaScript 方法的全部知识点都在这了</title><link>https://fe-tech.viewnode.com/post/202102/25/</link><pubDate>Thu, 25 Feb 2021 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202102/25/</guid><description>1. 什么是方法 首先让我们定义并调用常规函数： function greet(who) { return `Hello, ${who}!`; } greet(&amp;#39;World&amp;#39;); // =&amp;gt; &amp;#39;Hello, World!&amp;#39; 常规函数定义的形式为关键字 function 后跟名称、参数和函数体：function greet(who) {...} 。</description></item><item><title>在调用函数时到底可以传多少个参数</title><link>https://fe-tech.viewnode.com/post/202011/10/</link><pubDate>Tue, 10 Nov 2020 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202011/10/</guid><description>在创建一个函数并调用时可以传入一些参数或变量，不过函数究竟可以有多少可用的参数呢？？ 函数中的变量 以下通过一个例子来检查在调用函数时会有哪些变</description></item><item><title>在 JavaScript 中定义函数的几种不同方法</title><link>https://fe-tech.viewnode.com/post/202009/16/</link><pubDate>Wed, 16 Sep 2020 10:00:00 +0800</pubDate><guid>https://fe-tech.viewnode.com/post/202009/16/</guid><description>你知道在 JavaScript 中创建一个函数有多少种方式吗？ 1. 声明函数 function sum(a, b) { return a + b; } 2. 表达式函数 // 可以命名: (function sum(a, b) { return a + b; }); // 也可匿名 (AVOID): (function(a, b) { return a + b; }); //</description></item></channel></rss>