diff --git a/glossary/Cross-site-scripting-xss.md b/glossary/Cross-site-scripting-xss.md new file mode 100644 index 000000000..b9a53cc28 --- /dev/null +++ b/glossary/Cross-site-scripting-xss.md @@ -0,0 +1,4 @@ +### Cross-site scripting (XSS) + +XSS refers to client-side code injection where the attacker injects malicious scripts into a legitimate website or web application. +This is often achieved when the application does not validate user input and freely injects dynamic HTML content. diff --git a/glossary/DOM.md b/glossary/DOM.md new file mode 100644 index 000000000..e7f82e24b --- /dev/null +++ b/glossary/DOM.md @@ -0,0 +1,5 @@ +### DOM + +The DOM (Document Object Model) is a cross-platform API that treats HTML and XML documents as a tree structure consisting of nodes. +These nodes (such as elements and text nodes) are objects that can be programmatically manipulated and any visible changes made to them are reflected live in the document. +In a browser, this API is available to JavaScript where DOM nodes can be manipulated to change their styles, contents, placement in the document, or interacted with through event listeners. diff --git a/glossary/Functional-programming.md b/glossary/Functional-programming.md new file mode 100644 index 000000000..fa9db7996 --- /dev/null +++ b/glossary/Functional-programming.md @@ -0,0 +1,4 @@ +### Functional programming + +Functional programming is a paradigm in which programs are built in a declarative manner using pure functions that avoid shared state and mutable data. +Functions that always return the same value for the same input and don't produce side effects are the pillar of functional programming. diff --git a/glossary/Promise.md b/glossary/Promise.md new file mode 100644 index 000000000..7ade5ccf7 --- /dev/null +++ b/glossary/Promise.md @@ -0,0 +1,4 @@ +### Promise + +The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value. +A Promise can be in one of these states: pending(initial state, neither fulfilled nor rejected), fulfilled(operation completed successfully), rejected(operation failed). diff --git a/glossary/Recursion.md b/glossary/Recursion.md new file mode 100644 index 000000000..23eb35182 --- /dev/null +++ b/glossary/Recursion.md @@ -0,0 +1,6 @@ +### Recursion + +Recursion is the repeated application of a process. +In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base condition. +The base condition breaks out of the recursion loop because otherwise the function would call itself indefinitely. +Recursion is very useful when working with nested data, especially when the nesting depth is dynamically defined or unkown.