Master the Language of Code
Decode complex jargon with simplified definitions, deep-dive technical explanations, and real-world code snippets.
Showing 3 Terms
Recursion
AlgorithmsConcept
Imagine standing between two mirrors. You see an infinite hallway of yourself. Recursion is like that—a process that repeats itself by calling a smaller version of itself until it hits a wall (stopping point).
A method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. It involves a base case to terminate execution and a recursive step.
function factorial(n) {
// Base Case: The stopping point
if (n === 0) {
return 1;
}
// Recursive Step: The function calls itself
return n * factorial(n - 1);
}Big O Notation
CS FundamentalsPerformance
A way to measure how "hard" a computer has to work as the task gets bigger. It tells you if your code will slow down drastically when handling 1 million users versus 10 users.
Mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. In CS, it classifies algorithms according to how their run time or space requirements grow as the input size grows.
Linear vs Quadratic Growth
DOM
Web DevStructure
The "Document Object Model" is basically a family tree of all the elements on a webpage. JavaScript uses this map to find and change things, like turning a button red or hiding a paragraph.
A cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document.
// Select an element from the DOM
const button = document.getElementById('myBtn');
// Manipulate the element
button.style.backgroundColor = 'blue';
button.innerText = 'Clicked!';