FED

©FrontEndDev.org
2015 - 2024
web@2.23.0 api@2.21.1
知识点资源
函数 - JavaScript | MDN
函数是 JavaScript 中的基本组件之一。JavaScript 中的函数类似于过程——一组执行任务或计算值的语句。但要成为函数,这个过程应该接受输入并返回与输入存在某些明显关系的输出。要使用一个函数,你必须将其定义在你希望调用它的作用域内。
Unlimited function parameters using Rest in JavaScript
Usually, when working with functions with JavaScript, the parameters that you pass into the function would be fixed in numbers.
默认参数值 - JavaScript | MDN
函数默认参数允许在没有值或 undefined 被传入时使用默认形参。
剩余参数 - JavaScript | MDN
剩余参数语法允许我们将一个不定数量的参数表示为一个数组。
REST API posts on daily.dev
Explore RESTful API design principles and implementation techniques for building scalable and interoperable web services. Learn about REST architecture, HTTP methods, and API design patterns. Whether you're a backend developer, API architect, or web service consumer, there's content here to help you design and consume REST APIs effectively.
箭头函数表达式 - JavaScript | MDN
箭头函数表达式的语法比传统的函数表达式更简洁,但在语义上有一些差异,在用法上也有一些限制:
立即调用函数表达式 - MDN Web 文档术语表:Web 相关术语的定义 | MDN
立即调用函数表达式(IIFE)是一个在定义时就会立即执行的 JavaScript 函数。IIFE 这个名字是由 Ben Alman 在他的博客中提出的。
What is an IIFE in JavaScript?
Learn what an Immediately Invoked Function Expression (IIFE) is in five minutes or less!
Arguments 对象 - JavaScript | MDN
arguments 是一个对应于传递给函数的参数的类数组对象。
调用栈 - MDN Web 文档术语表:Web 相关术语的定义 | MDN
调用栈是解释器(比如 Web 浏览器中的 JavaScript 解释器)用来追踪其在调用多个函数的脚本中所处位置的机制——当前正在运行的函数是哪一个,以及在该函数内部调用了哪些函数,等等。
作用域 - MDN Web 文档术语表:Web 相关术语的定义 | MDN
作用域是当前的执行上下文,在其中的值和表达式“可见”(可被访问)。如果一个变量或表达式不在当前的作用域中,那么它是不可用的。作用域也可以堆叠成层次结构,子作用域可以访问父作用域,反过来则不行。
Recursion and stack
Recursion is a programming pattern that is useful in situations when a task can be naturally split into several tasks of the same kind, but simpler. Or when a task can be simplified into an easy action plus a simpler variant of the same task. Or, as we’ll see soon, to deal with certain data structures.
JavaScript Function Recursions - How Recursions Work | Codeguage
Recursions aren't a concept native to programming. In fact, long before programming become a routine activity, recursions were a paramount part of mathematics.
递归 - MDN Web 文档术语表:Web 相关术语的定义 | MDN
一种函数调用自身的操作。递归被用于处理包含有更小的子问题的一类问题。一个递归函数可以接受两个输入参数:一个最终状态(终止递归)或一个递归状态(继续递归)。
Recursion posts on daily.dev
Recursion is a programming technique where a function calls itself to solve a problem by breaking it down into smaller subproblems. It is commonly used in algorithms and data structures, such as tree traversal, sorting, and search algorithms, to simplify complex problems and reduce code duplication.
闭包 - JavaScript | MDN
闭包(closure)是一个函数以及其捆绑的周边环境状态(lexical environment,词法环境)的引用的组合。换而言之,闭包让开发者可以从内部函数访问外部函数的作用域。在 JavaScript 中,闭包会随着函数的创建而被同时创建。
JavaScript Closures - The Simplest Explanation | Codeguage
In the chapter, JavaScript Functions Basics, we briefly came across about the concept of a function closure. Closures are one of the most useful and beautiful ideas of functions in JavaScript and many other languages that support first class function and are based on a lexical scoping system.
JavaScript Closures Explained in 3 Minutes
Closures in JavaScript tend to seem more difficult than it actually is. The essence is basically the following:
JavaScript Built-in Functions
JavaScript Built-in Functions - The Number object contains only the default methods that are part of every object's definition.
Built-in Methods in Javascript 🤓
Hi! Programming can be overwhelming 😫 but once you are comfortable with some basic concepts,...
JavaScript Built-in Functions
JavaScript Built-in Functions - Tutorial to learn JavaScript Built-in Functions in simple, easy and step by step way with syntax, examples and notes. Covers topics like Common Built-in Functions, User-defined Functions, executing a function on an event in JavaScript etc.
Built-in Methods in Javascript 🤓
Hi! Programming can be overwhelming 😫 but once you are comfortable with some basic concepts,...
严格模式 - JavaScript | MDN
ECMAScript 5的严格模式是采用具有限制性 JavaScript 变体的一种方式,从而使代码隐式地脱离“马虎模式/稀松模式/懒散模式“(sloppy)模式。严格模式不仅仅是一个子集:它的产生是为了形成与正常代码不同的语义。不支持严格模式与支持严格模式的浏览器在执行严格模式代码时会采用不同行为。所以在没有对运行环境展开特性测试来验证对于严格模式相关方面支持的情况下,就算采用了严格模式也不一定会取得预期效果。严格模式代码和非严格模式代码可以共存,因此项目脚本可以渐进式地采用严格模式。严格模式对正常的 JavaScript 语义做了一些更改。
The modern mode, "use strict"
For a long time, JavaScript evolved without compatibility issues. New features were added to the language while old functionality didn’t change.
Object methods, "this"
Here we’ve just used a Function Expression to create a function and assign it to the property user.sayHi of the object.
W3Schools The JavaScript this Keyword
The JavaScript this Keyword
JavaScript "this" keyword and arrow function
Here this keyword which is in arrow function points to obj's variable environment var greeting = 'hi'; const obj = { greeting: 'hey', fo() { const greeting = 'hola'; const
this - JavaScript | MDN
与其他语言相比,函数的 this 关键字在 JavaScript 中的表现略有不同,此外,在严格模式和非严格模式之间也会有一些差别。
Function Borrowing in JavaScript
When we create JavaScript objects, we typically associate them with certain behavior. Consider the below example:
When would I use function borrowing?
Function borrowing is borrowing the function from an object rather than redefining it; but why should I do it. We can have a generic function and objects can use them further. To be more precise; w...
Javascript ‘This’. Who Is This?
This. Default, Implicit, Explicit, and New Binding. Arrow Functions
Explicit Binding rule for this keyword in JS
This is part of the series this keyword in Javascript
相关文章
这里空空如也
相关讨论
这里空空如也