开发者
编程技术、框架工具、最佳实践
共 6862 篇 · 第 109/344 页
Preemption is GC for memory reordering (2019)
US Food and Drug Administration rejects petition to set PFAS limits in food
The best Roku feature for night owls you probably aren't using
If you indulge in late-night binge-watching on your Roku, Fire Stick or Google TV, you're going to want to enable this feature.
OpenBSD has a use-after-free allowing local privilege escalation to root
A bug which affected only left handed users
Cloudflare Meerkat - Globally distributed consensus
Tiny data centre used to heat public swimming pool
Just Keep At It: A Decade at Mozilla
submitted by /u/eqrion [link] [留言]
Don't rewrite your CLI for agents
Routebase
Catch API drift before your customers do Discussion | Link
The Age of Reading Is Over
Handsum: An LQIP Image File Format
DuckDuckGo Browser can now block video ads, including YouTube's
DuckDuckGo will now block video ads by default in its browser.
Optimization Solver as a Service
Otary – Image and Geometry Python Library Now Has Tutorials
Approximating Floating-Point Addition Using The Geometric Mean [PDF]
submitted by /u/self [link] [留言]
Next.js vs React in 2026
React is a library, Next.js is a framework — here's what that actually means for your project, and how to choose based on SEO, scale, and team.
List of European organizations that have banned personal messaging apps at work
JavaScript Functions: Basic Concepts You Should Know
Introduction When learning JavaScript, one of the first concepts you’ll encounter is functions. Functions are the building blocks of JavaScript. They help you organize code, avoid repetition, and make your programs easier to understand. If variables store data, functions define behavior . You’ll use functions everywhere: handling user input, processing data, calling APIs, and structuring your code. In this article, we’ll cover: What is a function Function declarations Function expressions Parameters vs arguments Return values Arrow Functions Why Functions Matter 1. What is a Function? A function is a reusable block of code designed to perform a specific task. Think of it like a machine: Input → Process → Output function greet () { console . log ( " Hello! " ); } To run the function, you call it: greet (); // Hello! 2. Function Declaration This is the most common way to define a function: function add ( a , b ) { return a + b ; } 💡 Explanation: Defined using the function keyword Can be called before it is declared (because of hoisting) Key parts: function → keyword add → function name a, b → parameters return → output value add (); // ✅ Works! function add ( a , b ) { return a + b ; } 💡 Why does this work? JavaScript reads the code first, and function declarations are stored in memory during the initial phase (hoisting) . That’s why you can call the function even before it’s defined in the code. 3. Function Expressions Functions can also be stored in variables: function add ( a , b ) { return a + b ; } 💡 Explanation: Assigned to a variable Cannot be used before initialization add (); // ❌ Error: Cannot access before initialization const add = function ( a , b ) { return a + b ; }; 💡 Why does this cause an error? Because: const add has not been initialized yet when it is called. The function itself is not in memory at that moment . 4. Parameters vs Arguments This is a common beginner confusion: Parameter: variable in function definition Argument: actual value passed i