Zum Hauptinhalt springen
LIVE
CVSS 9.3CVE-2026-136666 | WTW-NEKO provided by Wireless Tsukamoto CO., LTD. uses hard-coded credentials, which may allow an attacker to obtain administrative privileges on the affected product.CVSS 8.7CVE-2026-136351 | Joomla Extension - joomshaper.com - Unauthenticated disclosure of guest order details in payment success task in Easy Store extension 1.0.0-3.1.1 - The payment success task returned the access token of any guest order for a request-supplied order ID, allowing unauthenticated users to read the guest customer's name, address, email address, phone number and order contents.CVSS 8.7CVE-2026-136348 | Joomla Extension - joomshaper.com - Stored XSS in checkout and customer address fields in Easy Store extension 1.0.0-3.1.1 - Checkout and customer address fields were stored without sanitization and rendered without escaping in order, invoice and order email layouts, allowing anyone who can place an order to inject scripts.CVSS 8.2CVE-2026-136347 | Joomla Extension - joomshaper.com - SSRF and signature verification bypass in PayPal webhook in Easy Store extension 1.0.0-3.1.1 - The PayPal webhook fetched the signing certificate from a request-supplied URL without restricting the host and treated signature verification errors as a valid signature, allowing unauthenticated users to forge webhook requests that change the payment status of orders.CVSS 8.6CVE-2026-136331 | Joomla Extension - joomshaper.com - Path traversal leading to arbitrary file read and deletion in export download in Easy Store extension 1.0.0-3.1.1 - The export download tasks for products, customers and orders only checked a string prefix of a user-supplied path, allowing backend users to read arbitrary files and delete files and directories outside the export folder.CVSS 6.4CVE-2026-137145 | The BuddyPress Group Email Subscription plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'ass_admin_notice_subject' parameter in all versions up to, and including, 4.2.4 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with subscriber-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This is exploCVSS 9.1CVE-2026-119231 | The 3D Print Pricing Calculator plugin for WordPress is vulnerable to limited file deletion due to insufficient file path validation in the ppc3d_handle_file_upload function in all versions up to, and including, 1.4.8.9. This makes it possible for unauthenticated attackers to delete arbitrary files in the wp_upload_dir on the server. The required nonce is emitted to unauthenticated front-end visitors via wp_localize_script, making it trivially obtainable; deCVSS 8.4CVE-2026-81107 | Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains an Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability. A low privileged local attacker could potentially exploit this vulnerability, leading to Script injection.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

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 o…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung




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:




  1. What is a function

  2. Function declarations

  3. Function expressions

  4. Parameters vs arguments

  5. Return values

  6. Arrow Functions

  7. 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 in



function greet(name) { // parameter
return `Hello, ${name}`;
}

greet("Dini"); // argument







5. Return Values



Functions can send data back using return.




function multiply(a, b) {
return a * b;
}

const result = multiply(2, 3);
console.log(result); // 6






If you don’t use return, the function returns undefined.






6. Arrow Functions (Modern Syntax)



A shorter way to write functions:




const add = (a, b) => {
return a + b;
};






Even shorter (implicit return):




const add = (a, b) => a + b;









7. Why Functions Matter



Functions help you:




  • Avoid repeating code (DRY principle)

  • Make code more readable

  • Break problems into smaller pieces

  • Reuse logic easily






Conclusion



Functions are fundamental to writing JavaScript effectively.



Once you understand:




  • how to define them

  • how data flows in/out

  • and how to reuse them



you’ve unlocked a huge part of programming.






References



https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions

https://javascript.info/function-basics

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Communitydiscussie & reacties

🌐 Naar de hoofdchat

Start de discussie in de Social Chat broadcaststream of dien hierboven een vakbijdrage in via het aanvulformulier.

Community Rating & Social Proof
⭐ Lezersbeoordeling
–
Ø / 5.0
Nog geen recensies van lezers
Was dit artikel nuttig?
0
Geef uw beoordeling
Detailbeoordeling (optioneel)
Inhoud & Kwaliteit
Bron & Geloofwaardigheid
Actualiteit
Security Briefing Gratis · 1-klik uitschrijven

Intelligence Digest gratis

Dagelijks het belangrijkste beveiligingsnieuws · kan op elk moment worden opgehaald

Verwant Story Cluster & Sources (vector AI)

6 Cluster
Soortgelijke bijdragen
🔍 Verwandte News

Auch interessante Nachrichten JavaScript Functions: Basic Concepts You Should Know

Thematisch verwandte Begriffe: JavaScript, Functions, Basic, Concepts · 6 Treffer

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

💬 Reacties worden geladen…
Trek om te vernieuwen
Widgets & onderwerpen
Widgets laden…
Volgende bericht