79 lines
71 KiB
HTML
79 lines
71 KiB
HTML
<!DOCTYPE html><html lang="en"><head><link rel="stylesheet" href="./style.css"><title>Glossary - 30 seconds of code</title><meta charset="utf-8"><meta name="description" content="Curated collection of useful Javascript snippets that you can understand in 30 seconds or less."><meta name="keywords" content="javascript, snippets, code, programming"><meta name="author" content="Angelos Chalaris (chalarangelo@gmail.com)"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#111"><meta property="og:title" content="30 seconds of code"><meta property="og:description" content="Curated collection of useful Javascript snippets that you can understand in 30 seconds or less."/><meta property="og:type" content="website"/><meta property="og:image" content="https://30secondsofcode.org/logos/logo_512.png"><link rel="icon" type="image/png" href="./logos/logo_128.png"><link rel="manifest" href="manifest.json"><script>const search = (node) => {
|
|
if(node.value.toLowerCase().trim() === ''){
|
|
document.querySelector('nav').querySelectorAll('li').forEach(x => x.style.display = '');
|
|
document.querySelector('nav').querySelectorAll('h4:not(.static-link)').forEach(x => x.classList = 'collapse');
|
|
return;
|
|
}
|
|
let matchingTags = [];
|
|
Array.from(document.querySelector('nav').querySelectorAll('li')).forEach(x => {
|
|
let data = [x.textContent.toLowerCase(), ...x.querySelector('a').getAttribute('tags').split(',')].map(v => !!(v.indexOf(node.value.toLowerCase()) + 1));
|
|
if(data.includes(true)){
|
|
x.style.display = '';
|
|
matchingTags.push(x.querySelector('a').getAttribute('tags').split(',')[0]);
|
|
}
|
|
else x.style.display = 'none';
|
|
});
|
|
Array.from(document.querySelector('nav').querySelectorAll('h4:not(.static-link)')).forEach(x => {
|
|
x.classList = matchingTags.includes(x.textContent.toLowerCase()) ? 'collapse toggled' : 'collapse';
|
|
})
|
|
}
|
|
function scrollToTop() {
|
|
const c = document.querySelector('.card-container').scrollTop;
|
|
if (c > 0) {
|
|
window.requestAnimationFrame(scrollToTop);
|
|
document.querySelector('.card-container').scrollTo(0, c - c / 4);
|
|
}
|
|
};
|
|
function scrollTo(element, to, id, duration) {
|
|
if (duration <= 0) return;
|
|
var difference = to - element.scrollTop;
|
|
var perTick = difference / duration * 40;
|
|
|
|
setTimeout(function () {
|
|
element.scrollTop = element.scrollTop + perTick;
|
|
if (element.scrollTop === to) {
|
|
window.location.href = "#" + id;
|
|
return;
|
|
}
|
|
scrollTo(element, to, id, duration - 40);
|
|
}, 40);
|
|
};
|
|
function loader() {
|
|
registerClickListener();
|
|
}
|
|
function registerClickListener() {
|
|
document.addEventListener('click', function (event) {
|
|
if (event.target.classList.contains('collapse')) {
|
|
event.target.classList = event.target.classList.contains('toggled') ? 'collapse' : 'collapse toggled';
|
|
}
|
|
else if (event.target.classList.contains('menu-button')) {
|
|
document.querySelector('nav').classList = event.target.classList.contains('toggled') ? '' : 'col-nav';
|
|
document.querySelector('[type="search"]').classList = event.target.classList.contains('toggled') ? '' : 'col-nav';
|
|
event.target.classList = event.target.classList.contains('toggled') ? 'menu-button' : 'menu-button toggled';
|
|
}
|
|
else if (!document.querySelector('nav').contains(event.target) && !document.querySelector('[type="search"]').contains(event.target) && window.innerWidth < '768') {
|
|
document.querySelector('nav').classList = '';
|
|
document.querySelector('[type="search"]').classList = '';
|
|
document.querySelector('.menu-button').classList = 'menu-button';
|
|
}
|
|
else if (event.target.classList.contains('copy-button')) {
|
|
const text = event.target.parentElement.parentElement.querySelector(':not(pre) + pre').textContent;
|
|
const textArea = document.createElement("textarea");
|
|
textArea.value = text.trim();
|
|
document.body.appendChild(textArea);
|
|
textArea.select();
|
|
document.execCommand("Copy");
|
|
document.body.removeChild(textArea);
|
|
let tst = document.createElement('div');
|
|
tst.classList = 'toast';
|
|
tst.innerHTML = 'Snippet copied to clipboard!';
|
|
document.body.appendChild(tst);
|
|
setTimeout(function () {
|
|
tst.style.opacity = 0;
|
|
setTimeout(function () {
|
|
document.body.removeChild(tst);
|
|
}, 300);
|
|
}, 1700);
|
|
}
|
|
}, false);
|
|
}</script></head><body onload="loader()" class="card-page"><a href="https://github.com/30-seconds/30-seconds-of-code" class="github-corner" aria-label="View source on Github"><svg width="56" height="56" viewBox="0 0 250 250" style="fill:#009688;color:#fff;position:fixed;top:0;border:0;right:0;z-index:1000" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><button class="menu-button"></button><header><h1 class="logo"><a href="./index"><img src="https://30secondsofcode.org/logos/logo_256.png" alt="logo"/><span id="title"> 30 seconds of code</span> <small>Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.</small></a></h1></header><div class="container card-container"><input class="search" type="search" id="searchInput" onkeyup="search(this)" placeholder="Search..." aria-label="Snippet search"><nav><h4 class="collapse">Adapter</h4><ul><li><a tags="adapter,function,intermediate" href="./adapter#ary">ary</a></li><li><a tags="adapter,function,intermediate" href="./adapter#call">call</a></li><li><a tags="adapter,function,array,intermediate" href="./adapter#collectinto">collectInto</a></li><li><a tags="adapter,function,intermediate" href="./adapter#flip">flip</a></li><li><a tags="adapter,function,intermediate" href="./adapter#over">over</a></li><li><a tags="adapter,function,intermediate" href="./adapter#overargs">overArgs</a></li><li><a tags="adapter,function,promise,intermediate" href="./adapter#pipeasyncfunctions">pipeAsyncFunctions</a></li><li><a tags="adapter,function,intermediate" href="./adapter#pipefunctions">pipeFunctions</a></li><li><a tags="adapter,function,promise,intermediate" href="./adapter#promisify">promisify</a></li><li><a tags="adapter,function,intermediate" href="./adapter#rearg">rearg</a></li><li><a tags="adapter,intermediate" href="./adapter#spreadover">spreadOver</a></li><li><a tags="adapter,function,intermediate" href="./adapter#unary">unary</a></li></ul><h4 class="collapse">Array</h4><ul><li><a tags="array,function,beginner" href="./index#all">all</a></li><li><a tags="array,function,beginner" href="./index#allequal">allEqual</a></li><li><a tags="array,function,beginner" href="./index#any">any</a></li><li><a tags="array,string,utility,intermediate" href="./index#arraytocsv">arrayToCSV</a></li><li><a tags="array,intermediate" href="./index#bifurcate">bifurcate</a></li><li><a tags="array,function,intermediate" href="./index#bifurcateby">bifurcateBy</a></li><li><a tags="array,intermediate" href="./index#chunk">chunk</a></li><li><a tags="array,beginner" href="./index#compact">compact</a></li><li><a tags="array,object,intermediate" href="./index#countby">countBy</a></li><li><a tags="array,intermediate" href="./index#countoccurrences">countOccurrences</a></li><li><a tags="array,recursion,intermediate" href="./index#deepflatten">deepFlatten</a></li><li><a tags="array,math,beginner" href="./index#difference">difference</a></li><li><a tags="array,function,intermediate" href="./index#differenceby">differenceBy</a></li><li><a tags="array,function,intermediate" href="./index#differencewith">differenceWith</a></li><li><a tags="array,beginner" href="./index#drop">drop</a></li><li><a tags="array,beginner" href="./index#dropright">dropRight</a></li><li><a tags="array,function,intermediate" href="./index#droprightwhile">dropRightWhile</a></li><li><a tags="array,function,intermediate" href="./index#dropwhile">dropWhile</a></li><li><a tags="array,beginner" href="./index#everynth">everyNth</a></li><li><a tags="array,beginner" href="./index#filterfalsy">filterFalsy</a></li><li><a tags="array,beginner" href="./index#filternonunique">filterNonUnique</a></li><li><a tags="array,function,intermediate" href="./index#filternonuniqueby">filterNonUniqueBy</a></li><li><a tags="array,beginner" href="./index#findlast">findLast</a></li><li><a tags="array,function,intermediate" href="./index#findlastindex">findLastIndex</a></li><li><a tags="array,intermediate" href="./index#flatten">flatten</a></li><li><a tags="array,function,intermediate" href="./index#foreachright">forEachRight</a></li><li><a tags="array,object,intermediate" href="./index#groupby">groupBy</a></li><li><a tags="array,beginner" href="./index#head">head</a></li><li><a tags="array,intermediate" href="./index#indexofall">indexOfAll</a></li><li><a tags="array,beginner" href="./index#initial">initial</a></li><li><a tags="array,intermediate" href="./index#initialize2darray">initialize2DArray</a></li><li><a tags="array,math,intermediate" href="./index#initializearraywithrange">initializeArrayWithRange</a></li><li><a tags="array,math,intermediate" href="./index#initializearraywithrangeright">initializeArrayWithRangeRight</a></li><li><a tags="array,math,intermediate" href="./index#initializearraywithvalues">initializeArrayWithValues</a></li><li><a tags="array,recursion,intermediate" href="./index#initializendarray">initializeNDArray</a></li><li><a tags="array,math,intermediate" href="./index#intersection">intersection</a></li><li><a tags="array,function,intermediate" href="./index#intersectionby">intersectionBy</a></li><li><a tags="array,function,intermediate" href="./index#intersectionwith">intersectionWith</a></li><li><a tags="array,intermediate" href="./index#issorted">isSorted</a></li><li><a tags="array,intermediate" href="./index#join">join</a></li><li><a tags="array,string,object,advanced" href="./index#jsontocsv">JSONtoCSV</a></li><li><a tags="array,beginner" href="./index#last">last</a></li><li><a tags="array,string,utility,intermediate" href="./index#longestitem">longestItem</a></li><li><a tags="array,object,advanced" href="./index#mapobject">mapObject</a></li><li><a tags="array,math,beginner" href="./index#maxn">maxN</a></li><li><a tags="array,math,beginner" href="./index#minn">minN</a></li><li><a tags="array,function,beginner" href="./index#none">none</a></li><li><a tags="array,beginner" href="./index#nthelement">nthElement</a></li><li><a tags="array,beginner" href="./index#offset">offset</a></li><li><a tags="array,object,function,intermediate" href="./index#partition">partition</a></li><li><a tags="array,recursion,advanced" href="./index#permutations">permutations</a></li><li><a tags="array,intermediate" href="./index#pull">pull</a></li><li><a tags="array,advanced" href="./index#pullatindex">pullAtIndex</a></li><li><a tags="array,advanced" href="./index#pullatvalue">pullAtValue</a></li><li><a tags="array,function,advanced" href="./index#pullby">pullBy</a></li><li><a tags="array,intermediate" href="./index#reducedfilter">reducedFilter</a></li><li><a tags="array,function,intermediate" href="./index#reducesuccessive">reduceSuccessive</a></li><li><a tags="array,function,intermediate" href="./index#reducewhich">reduceWhich</a></li><li><a tags="array,beginner" href="./index#reject">reject</a></li><li><a tags="array,intermediate" href="./index#remove">remove</a></li><li><a tags="array,random,beginner" href="./index#sample">sample</a></li><li><a tags="array,random,intermediate" href="./index#samplesize">sampleSize</a></li><li><a tags="array,intermediate" href="./index#shank">shank</a></li><li><a tags="array,random,intermediate" href="./index#shuffle">shuffle</a></li><li><a tags="array,math,beginner" href="./index#similarity">similarity</a></li><li><a tags="array,math,intermediate" href="./index#sortedindex">sortedIndex</a></li><li><a tags="array,math,function,intermediate" href="./index#sortedindexby">sortedIndexBy</a></li><li><a tags="array,math,intermediate" href="./index#sortedlastindex">sortedLastIndex</a></li><li><a tags="array,math,function,intermediate" href="./index#sortedlastindexby">sortedLastIndexBy</a></li><li><a tags="array,sort,advanced,intermediate" href="./index#stablesort">stableSort</a></li><li><a tags="array,math,intermediate" href="./index#symmetricdifference">symmetricDifference</a></li><li><a tags="array,function,intermediate" href="./index#symmetricdifferenceby">symmetricDifferenceBy</a></li><li><a tags="array,function,intermediate" href="./index#symmetricdifferencewith">symmetricDifferenceWith</a></li><li><a tags="array,beginner" href="./index#tail">tail</a></li><li><a tags="array,beginner" href="./index#take">take</a></li><li><a tags="array,intermediate" href="./index#takeright">takeRight</a></li><li><a tags="array,function,intermediate" href="./index#takerightwhile">takeRightWhile</a></li><li><a tags="array,function,intermediate" href="./index#takewhile">takeWhile</a></li><li><a tags="array,intermediate" href="./index#tohash">toHash</a></li><li><a tags="array,math,beginner" href="./index#union">union</a></li><li><a tags="array,function,intermediate" href="./index#unionby">unionBy</a></li><li><a tags="array,function,intermediate" href="./index#unionwith">unionWith</a></li><li><a tags="array,beginner" href="./index#uniqueelements">uniqueElements</a></li><li><a tags="array,function,intermediate" href="./index#uniqueelementsby">uniqueElementsBy</a></li><li><a tags="array,function,intermediate" href="./index#uniqueelementsbyright">uniqueElementsByRight</a></li><li><a tags="array,math,intermediate" href="./index#uniquesymmetricdifference">uniqueSymmetricDifference</a></li><li><a tags="array,intermediate" href="./index#unzip">unzip</a></li><li><a tags="array,function,advanced" href="./index#unzipwith">unzipWith</a></li><li><a tags="array,beginner" href="./index#without">without</a></li><li><a tags="array,math,intermediate" href="./index#xprod">xProd</a></li><li><a tags="array,intermediate" href="./index#zip">zip</a></li><li><a tags="array,object,intermediate" href="./index#zipobject">zipObject</a></li><li><a tags="array,function,advanced" href="./index#zipwith">zipWith</a></li></ul><h4 class="collapse">Browser</h4><ul><li><a tags="browser,array,intermediate" href="./browser#arraytohtmllist">arrayToHtmlList</a></li><li><a tags="browser,intermediate" href="./browser#bottomvisible">bottomVisible</a></li><li><a tags="browser,string,advanced" href="./browser#copytoclipboard">copyToClipboard</a></li><li><a tags="browser,advanced" href="./browser#counter">counter</a></li><li><a tags="browser,utility,beginner" href="./browser#createelement">createElement</a></li><li><a tags="browser,event,advanced" href="./browser#createeventhub">createEventHub</a></li><li><a tags="browser,url,beginner" href="./browser#currenturl">currentURL</a></li><li><a tags="browser,intermediate" href="./browser#detectdevicetype">detectDeviceType</a></li><li><a tags="browser,intermediate" href="./browser#elementcontains">elementContains</a></li><li><a tags="browser,advanced" href="./browser#elementisvisibleinviewport">elementIsVisibleInViewport</a></li><li><a tags="browser,object,intermediate" href="./browser#formtoobject">formToObject</a></li><li><a tags="browser,beginner" href="./browser#getimages">getImages</a></li><li><a tags="browser,intermediate" href="./browser#getscrollposition">getScrollPosition</a></li><li><a tags="browser,css,beginner" href="./browser#getstyle">getStyle</a></li><li><a tags="browser,css,beginner" href="./browser#hasclass">hasClass</a></li><li><a tags="browser,utility,advanced,promise,advanced" href="./browser#hashbrowser">hashBrowser</a></li><li><a tags="browser,css,beginner" href="./browser#hide">hide</a></li><li><a tags="browser,url,intermediate" href="./browser#httpsredirect">httpsRedirect</a></li><li><a tags="browser,beginner" href="./browser#insertafter">insertAfter</a></li><li><a tags="browser,beginner" href="./browser#insertbefore">insertBefore</a></li><li><a tags="browser,beginner" href="./browser#isbrowsertabfocused">isBrowserTabFocused</a></li><li><a tags="browser,array,beginner" href="./browser#nodelisttoarray">nodeListToArray</a></li><li><a tags="browser,event,advanced" href="./browser#observemutations">observeMutations</a></li><li><a tags="browser,event,intermediate" href="./browser#off">off</a></li><li><a tags="browser,event,intermediate" href="./browser#on">on</a></li><li><a tags="browser,event,advanced" href="./browser#onuserinputchange">onUserInputChange</a></li><li><a tags="browser,utility,intermediate" href="./browser#prefix">prefix</a></li><li><a tags="browser,utility,intermediate" href="./browser#recordanimationframes">recordAnimationFrames</a></li><li><a tags="browser,url,beginner" href="./browser#redirect">redirect</a></li><li><a tags="browser,function,advanced,promise,url" href="./browser#runasync">runAsync</a></li><li><a tags="browser,intermediate" href="./browser#scrolltotop">scrollToTop</a></li><li><a tags="browser,string,intermediate" href="./browser#serializeform">serializeForm</a></li><li><a tags="browser,beginner" href="./browser#setstyle">setStyle</a></li><li><a tags="browser,css,beginner" href="./browser#show">show</a></li><li><a tags="browser,css,intermediate" href="./browser#smoothscroll">smoothScroll</a></li><li><a tags="browser,beginner" href="./browser#toggleclass">toggleClass</a></li><li><a tags="browser,event,intermediate" href="./browser#triggerevent">triggerEvent</a></li><li><a tags="browser,utility,random,intermediate" href="./browser#uuidgeneratorbrowser">UUIDGeneratorBrowser</a></li></ul><h4 class="collapse">Date</h4><ul><li><a tags="date,beginner" href="./date#dayofyear">dayOfYear</a></li><li><a tags="date,math,string,utility,intermediate" href="./date#formatduration">formatDuration</a></li><li><a tags="date,intermediate" href="./date#getcolontimefromdate">getColonTimeFromDate</a></li><li><a tags="date,intermediate" href="./date#getdaysdiffbetweendates">getDaysDiffBetweenDates</a></li><li><a tags="date,beginner" href="./date#getmeridiemsuffixofinteger">getMeridiemSuffixOfInteger</a></li><li><a tags="date,utility,beginner" href="./date#isafterdate">isAfterDate</a></li><li><a tags="date,utility,beginner" href="./date#isbeforedate">isBeforeDate</a></li><li><a tags="date,utility,beginner" href="./date#issamedate">isSameDate</a></li><li><a tags="date,beginner" href="./date#isweekday">isWeekday</a></li><li><a tags="date,beginner" href="./date#isweekend">isWeekend</a></li><li><a tags="date,math,beginner" href="./date#maxdate">maxDate</a></li><li><a tags="date,math,beginner" href="./date#mindate">minDate</a></li><li><a tags="date,intermediate" href="./date#tomorrow">tomorrow</a></li><li><a tags="date,intermediate" href="./date#yesterday">yesterday</a></li></ul><h4 class="collapse">Function</h4><ul><li><a tags="function,intermediate" href="./function#attempt">attempt</a></li><li><a tags="function,object,intermediate" href="./function#bind">bind</a></li><li><a tags="function,object,intermediate" href="./function#bindkey">bindKey</a></li><li><a tags="function,intermediate" href="./function#chainasync">chainAsync</a></li><li><a tags="function,object,utility,beginner" href="./function#checkprop">checkProp</a></li><li><a tags="function,intermediate" href="./function#compose">compose</a></li><li><a tags="function,intermediate" href="./function#composeright">composeRight</a></li><li><a tags="function,intermediate" href="./function#converge">converge</a></li><li><a tags="function,recursion,intermediate" href="./function#curry">curry</a></li><li><a tags="function,intermediate" href="./function#debounce">debounce</a></li><li><a tags="function,intermediate" href="./function#defer">defer</a></li><li><a tags="function,intermediate" href="./function#delay">delay</a></li><li><a tags="function,utility,beginner" href="./function#functionname">functionName</a></li><li><a tags="function,intermediate" href="./function#hz">hz</a></li><li><a tags="function,advanced" href="./function#memoize">memoize</a></li><li><a tags="function,beginner" href="./function#negate">negate</a></li><li><a tags="function,intermediate" href="./function#once">once</a></li><li><a tags="function,intermediate" href="./function#partial">partial</a></li><li><a tags="function,intermediate" href="./function#partialright">partialRight</a></li><li><a tags="function,promise,intermediate" href="./function#runpromisesinseries">runPromisesInSeries</a></li><li><a tags="function,promise,intermediate" href="./function#sleep">sleep</a></li><li><a tags="function,advanced" href="./function#throttle">throttle</a></li><li><a tags="function,intermediate" href="./function#times">times</a></li><li><a tags="function,intermediate" href="./function#uncurry">uncurry</a></li><li><a tags="function,array,intermediate" href="./function#unfold">unfold</a></li><li><a tags="function,intermediate" href="./function#when">when</a></li></ul><h4 class="collapse">Math</h4><ul><li><a tags="math,beginner" href="./math#approximatelyequal">approximatelyEqual</a></li><li><a tags="math,array,beginner" href="./math#average">average</a></li><li><a tags="math,array,function,intermediate" href="./math#averageby">averageBy</a></li><li><a tags="math,intermediate" href="./math#binomialcoefficient">binomialCoefficient</a></li><li><a tags="math,beginner" href="./math#clampnumber">clampNumber</a></li><li><a tags="math,beginner" href="./math#degreestorads">degreesToRads</a></li><li><a tags="math,array,beginner" href="./math#digitize">digitize</a></li><li><a tags="math,beginner" href="./math#distance">distance</a></li><li><a tags="math,array,advanced" href="./math#elo">elo</a></li><li><a tags="math,recursion,beginner" href="./math#factorial">factorial</a></li><li><a tags="math,array,beginner" href="./math#fibonacci">fibonacci</a></li><li><a tags="math,recursion,beginner" href="./math#gcd">gcd</a></li><li><a tags="math,intermediate" href="./math#geometricprogression">geometricProgression</a></li><li><a tags="math,beginner" href="./math#hammingdistance">hammingDistance</a></li><li><a tags="math,beginner" href="./math#inrange">inRange</a></li><li><a tags="math,beginner" href="./math#isdivisible">isDivisible</a></li><li><a tags="math,beginner" href="./math#iseven">isEven</a></li><li><a tags="math,utility,beginner" href="./math#isnegativezero">isNegativeZero</a></li><li><a tags="math,beginner,intermediate" href="./math#isprime">isPrime</a></li><li><a tags="math,recursion,beginner" href="./math#lcm">lcm</a></li><li><a tags="math,utility,advanced" href="./math#luhncheck">luhnCheck</a></li><li><a tags="math,beginner" href="./math#mapnumrange">mapNumRange</a></li><li><a tags="math,array,function,beginner" href="./math#maxby">maxBy</a></li><li><a tags="math,array,intermediate" href="./math#median">median</a></li><li><a tags="math,array,beginner" href="./math#midpoint">midpoint</a></li><li><a tags="math,array,function,beginner" href="./math#minby">minBy</a></li><li><a tags="math,intermediate" href="./math#percentile">percentile</a></li><li><a tags="math,beginner" href="./math#powerset">powerset</a></li><li><a tags="math,array,intermediate" href="./math#primes">primes</a></li><li><a tags="math,beginner" href="./math#radstodegrees">radsToDegrees</a></li><li><a tags="math,utility,random,intermediate" href="./math#randomintarrayinrange">randomIntArrayInRange</a></li><li><a tags="math,utility,random,beginner" href="./math#randomintegerinrange">randomIntegerInRange</a></li><li><a tags="math,utility,random,beginner" href="./math#randomnumberinrange">randomNumberInRange</a></li><li><a tags="math,intermediate" href="./math#round">round</a></li><li><a tags="math,utility,intermediate" href="./math#sdbm">sdbm</a></li><li><a tags="math,array,intermediate" href="./math#standarddeviation">standardDeviation</a></li><li><a tags="math,array,beginner" href="./math#sum">sum</a></li><li><a tags="math,array,function,intermediate" href="./math#sumby">sumBy</a></li><li><a tags="math,intermediate" href="./math#sumpower">sumPower</a></li><li><a tags="math,beginner" href="./math#tosafeinteger">toSafeInteger</a></li><li><a tags="math,beginner" href="./math#vectordistance">vectorDistance</a></li></ul><h4 class="collapse">Node</h4><ul><li><a tags="node,string,utility,beginner" href="./node#atob">atob</a></li><li><a tags="node,string,utility,beginner" href="./node#btoa">btoa</a></li><li><a tags="node,utility,string,intermediate" href="./node#colorize">colorize</a></li><li><a tags="node,beginner" href="./node#createdirifnotexists">createDirIfNotExists</a></li><li><a tags="node,intermediate" href="./node#hasflags">hasFlags</a></li><li><a tags="node,utility,promise,intermediate" href="./node#hashnode">hashNode</a></li><li><a tags="node,type,intermediate" href="./node#isduplexstream">isDuplexStream</a></li><li><a tags="node,type,intermediate" href="./node#isreadablestream">isReadableStream</a></li><li><a tags="node,type,intermediate" href="./node#isstream">isStream</a></li><li><a tags="node,intermediate" href="./node#istravisci">isTravisCI</a></li><li><a tags="node,type,intermediate" href="./node#iswritablestream">isWritableStream</a></li><li><a tags="node,json,intermediate" href="./node#jsontofile">JSONToFile</a></li><li><a tags="node,array,string,beginner" href="./node#readfilelines">readFileLines</a></li><li><a tags="node,string,beginner" href="./node#untildify">untildify</a></li><li><a tags="node,utility,random,intermediate" href="./node#uuidgeneratornode">UUIDGeneratorNode</a></li></ul><h4 class="collapse">Object</h4><ul><li><a tags="object,function,intermediate" href="./object#bindall">bindAll</a></li><li><a tags="object,recursion,intermediate" href="./object#deepclone">deepClone</a></li><li><a tags="object,recursion,intermediate" href="./object#deepfreeze">deepFreeze</a></li><li><a tags="object,intermediate" href="./object#deepget">deepGet</a></li><li><a tags="object,recursion,advanced" href="./object#deepmapkeys">deepMapKeys</a></li><li><a tags="object,intermediate" href="./object#defaults">defaults</a></li><li><a tags="object,recursion,intermediate" href="./object#dig">dig</a></li><li><a tags="object,array,type,advanced" href="./object#equals">equals</a></li><li><a tags="object,function,intermediate" href="./object#findkey">findKey</a></li><li><a tags="object,function,intermediate" href="./object#findlastkey">findLastKey</a></li><li><a tags="object,recursion,intermediate" href="./object#flattenobject">flattenObject</a></li><li><a tags="object,intermediate" href="./object#forown">forOwn</a></li><li><a tags="object,intermediate" href="./object#forownright">forOwnRight</a></li><li><a tags="object,function,intermediate" href="./object#functions">functions</a></li><li><a tags="object,intermediate" href="./object#get">get</a></li><li><a tags="object,function,intermediate" href="./object#invertkeyvalues">invertKeyValues</a></li><li><a tags="object,intermediate" href="./object#lowercasekeys">lowercaseKeys</a></li><li><a tags="object,function,intermediate" href="./object#mapkeys">mapKeys</a></li><li><a tags="object,function,intermediate" href="./object#mapvalues">mapValues</a></li><li><a tags="object,type,intermediate" href="./object#matches">matches</a></li><li><a tags="object,type,function,intermediate" href="./object#matcheswith">matchesWith</a></li><li><a tags="object,array,intermediate" href="./object#merge">merge</a></li><li><a tags="object,intermediate" href="./object#nest">nest</a></li><li><a tags="object,array,beginner" href="./object#objectfrompairs">objectFromPairs</a></li><li><a tags="object,array,beginner" href="./object#objecttopairs">objectToPairs</a></li><li><a tags="object,array,intermediate" href="./object#omit">omit</a></li><li><a tags="object,array,function,intermediate" href="./object#omitby">omitBy</a></li><li><a tags="object,array,intermediate" href="./object#orderby">orderBy</a></li><li><a tags="object,array,intermediate" href="./object#pick">pick</a></li><li><a tags="object,array,function,intermediate" href="./object#pickby">pickBy</a></li><li><a tags="object,intermediate" href="./object#renamekeys">renameKeys</a></li><li><a tags="object,beginner" href="./object#shallowclone">shallowClone</a></li><li><a tags="object,array,string,intermediate" href="./object#size">size</a></li><li><a tags="object,array,intermediate" href="./object#transform">transform</a></li><li><a tags="object,logic,array,intermediate" href="./object#truthcheckcollection">truthCheckCollection</a></li><li><a tags="object,advanced" href="./object#unflattenobject">unflattenObject</a></li></ul><h4 class="collapse">String</h4><ul><li><a tags="string,beginner" href="./string#bytesize">byteSize</a></li><li><a tags="string,array,intermediate" href="./string#capitalize">capitalize</a></li><li><a tags="string,regexp,intermediate" href="./string#capitalizeeveryword">capitalizeEveryWord</a></li><li><a tags="string,regexp,beginner" href="./string#compactwhitespace">compactWhitespace</a></li><li><a tags="string,array,utility,intermediate" href="./string#csvtoarray">CSVToArray</a></li><li><a tags="string,array,object,advanced" href="./string#csvtojson">CSVToJSON</a></li><li><a tags="string,array,intermediate" href="./string#decapitalize">decapitalize</a></li><li><a tags="string,browser,regexp,intermediate" href="./string#escapehtml">escapeHTML</a></li><li><a tags="string,regexp,intermediate" href="./string#escaperegexp">escapeRegExp</a></li><li><a tags="string,intermediate" href="./string#fromcamelcase">fromCamelCase</a></li><li><a tags="string,utility,beginner" href="./string#indentstring">indentString</a></li><li><a tags="string,utility,browser,url,intermediate" href="./string#isabsoluteurl">isAbsoluteURL</a></li><li><a tags="string,regexp,intermediate" href="./string#isanagram">isAnagram</a></li><li><a tags="string,utility,beginner" href="./string#islowercase">isLowerCase</a></li><li><a tags="string,utility,beginner" href="./string#isuppercase">isUpperCase</a></li><li><a tags="string,array,function,utility,beginner" href="./string#mapstring">mapString</a></li><li><a tags="string,utility,regexp,intermediate" href="./string#mask">mask</a></li><li><a tags="string,beginner" href="./string#pad">pad</a></li><li><a tags="string,intermediate" href="./string#palindrome">palindrome</a></li><li><a tags="string,intermediate" href="./string#pluralize">pluralize</a></li><li><a tags="string,regexp,intermediate" href="./string#removenonascii">removeNonASCII</a></li><li><a tags="string,array,beginner" href="./string#reversestring">reverseString</a></li><li><a tags="string,beginner" href="./string#sortcharactersinstring">sortCharactersInString</a></li><li><a tags="string,beginner" href="./string#splitlines">splitLines</a></li><li><a tags="string,recursion,advanced" href="./string#stringpermutations">stringPermutations</a></li><li><a tags="string,utility,regexp,beginner" href="./string#striphtmltags">stripHTMLTags</a></li><li><a tags="string,regexp,intermediate" href="./string#tocamelcase">toCamelCase</a></li><li><a tags="string,regexp,intermediate" href="./string#tokebabcase">toKebabCase</a></li><li><a tags="string,regexp,intermediate" href="./string#tosnakecase">toSnakeCase</a></li><li><a tags="string,regepx,intermediate" href="./string#totitlecase">toTitleCase</a></li><li><a tags="string,beginner" href="./string#truncatestring">truncateString</a></li><li><a tags="string,browser,beginner" href="./string#unescapehtml">unescapeHTML</a></li><li><a tags="string,utility,regexp,advanced" href="./string#urljoin">URLJoin</a></li><li><a tags="string,regexp,intermediate" href="./string#words">words</a></li></ul><h4 class="collapse">Type</h4><ul><li><a tags="type,beginner" href="./type#gettype">getType</a></li><li><a tags="type,array,regexp,beginner" href="./type#is">is</a></li><li><a tags="type,array,intermediate" href="./type#isarraylike">isArrayLike</a></li><li><a tags="type,beginner" href="./type#isboolean">isBoolean</a></li><li><a tags="type,array,object,string,beginner" href="./type#isempty">isEmpty</a></li><li><a tags="type,function,beginner" href="./type#isfunction">isFunction</a></li><li><a tags="type,beginner" href="./type#isnil">isNil</a></li><li><a tags="type,beginner" href="./type#isnull">isNull</a></li><li><a tags="type,math,beginner" href="./type#isnumber">isNumber</a></li><li><a tags="type,object,beginner" href="./type#isobject">isObject</a></li><li><a tags="type,object,beginner" href="./type#isobjectlike">isObjectLike</a></li><li><a tags="type,object,intermediate" href="./type#isplainobject">isPlainObject</a></li><li><a tags="type,function,array,string,intermediate" href="./type#isprimitive">isPrimitive</a></li><li><a tags="type,function,promise,intermediate" href="./type#ispromiselike">isPromiseLike</a></li><li><a tags="type,string,beginner" href="./type#isstring">isString</a></li><li><a tags="type,beginner" href="./type#issymbol">isSymbol</a></li><li><a tags="type,beginner" href="./type#isundefined">isUndefined</a></li><li><a tags="type,json,intermediate" href="./type#isvalidjson">isValidJSON</a></li></ul><h4 class="collapse">Utility</h4><ul><li><a tags="utility,array,type,beginner" href="./utility#castarray">castArray</a></li><li><a tags="utility,regexp,intermediate" href="./utility#cloneregexp">cloneRegExp</a></li><li><a tags="utility,beginner" href="./utility#coalesce">coalesce</a></li><li><a tags="utility,intermediate" href="./utility#coalescefactory">coalesceFactory</a></li><li><a tags="utility,string,intermediate" href="./utility#extendhex">extendHex</a></li><li><a tags="utility,browser,string,url,intermediate" href="./utility#geturlparameters">getURLParameters</a></li><li><a tags="utility,string,math,advanced" href="./utility#hextorgb">hexToRGB</a></li><li><a tags="utility,url,browser,intermediate" href="./utility#httpget">httpGet</a></li><li><a tags="utility,url,browser,intermediate" href="./utility#httppost">httpPost</a></li><li><a tags="utility,browser,intermediate" href="./utility#isbrowser">isBrowser</a></li><li><a tags="utility,function" href="./utility#mostperformant">mostPerformant</a></li><li><a tags="utility,function,beginner" href="./utility#ntharg">nthArg</a></li><li><a tags="utility,string,intermediate" href="./utility#parsecookie">parseCookie</a></li><li><a tags="utility,string,math,advanced" href="./utility#prettybytes">prettyBytes</a></li><li><a tags="utility,random,beginner" href="./utility#randomhexcolorcode">randomHexColorCode</a></li><li><a tags="utility,intermediate" href="./utility#rgbtohex">RGBToHex</a></li><li><a tags="utility,string,intermediate" href="./utility#serializecookie">serializeCookie</a></li><li><a tags="utility,beginner" href="./utility#timetaken">timeTaken</a></li><li><a tags="utility,intermediate" href="./utility#tocurrency">toCurrency</a></li><li><a tags="utility,math,beginner" href="./utility#todecimalmark">toDecimalMark</a></li><li><a tags="utility,math,intermediate" href="./utility#toordinalsuffix">toOrdinalSuffix</a></li><li><a tags="utility,math,intermediate" href="./utility#validatenumber">validateNumber</a></li><li><a tags="utility,regexp,intermediate" href="./utility#yesno">yesNo</a></li></ul><h4 class="static-link"><a href="./archive">Archive</a></h4><h4 class="static-link"><a href="./glossary">Glossary</a></h4><h4 class="static-link"><a href="./contributing">Contributing</a></h4><h4 class="static-link"><a href="./about">About</a></h4><div><button class="social fb"></button><button class="social instagram"></button><button class="social twitter"></button></div></nav><main class="col-centered"><span id="top"><br/><br/></span><h2 class="category-name">Glossary</h2><p style="text-align:justify">Developers use a lot of terminology daily. Every once in a while, you might find a term you do not know. We know how frustrating that can get, so we provide you with a handy glossary of frequently used web development terms.</p><br/><div class="card code-card"><div class="section card-content"><h4 id="ajax.md">AJAX</h4><p>Asynchronous JavaScript and XML (known as AJAX) is a term that describes a new approach to using multiple technologies together in order to enable web applications to make quick updates to the user interface without reloading the entire browser page.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="api.md">API</h4><p>API stands for Application Programming Interface and is a set of features and rules provided by a provided by a software to enable third-party software to interact with it. The code features of a web API usually include methods, properties, events or URLs.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="argument.md">Argument</h4><p>An argument is a value passed as an input to a function and can be either a primitive or an object. In JavaScript, functions can also be passed as arguments to other functions.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="array.md">Array</h4><p>Arrays are used to store multiple values in a single variable. Arrays are ordered and each item in an array has a numeric index associated with it. JavaScript arrays are zero-indexed, meaning the first element's index is 0.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="asynchronous-programming.md">Asynchronous programming</h4><p>Asynchronous programming is a way to allow multiple events to trigger code without waiting for each other. The main benefits of asynchronous programming are improved application performance and responsiveness.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="automatic-semicolon-insertion.md">Automatic semicolon insertion</h4><p>Automatic semicolon insertion (ASI) is a JavaScript feature that allows developers to omit semicolons in their code.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="boolean.md">Boolean</h4><p>Booleans are one of the primitive data types in JavaScript. They represent logical data values and can only be <code>true</code> or <code>false</code>.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="callback.md">Callback</h4><p>A callback function, also known as a high-order function, is a function that is passed into another function as an argument, which is then executed inside the outer function. Callbacks can be synchronous or asynchronous.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="character-encoding.md">Character encoding</h4><p>A character encoding defines a mapping between bytes and text, specifying how the sequenece of bytes should be interpreted. Two commonly used character encodings are ASCII and UTF-8.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="class.md">Class</h4><p>In object-oriented programming, a class is a template definition of an object's properties and methods.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="closure.md">Closure</h4><p>A closure is the combination of a function and the lexical environment within which that function was declared. The closure allows a function to access the contents of that environment.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="coffeescript.md">CoffeeScript</h4><p>CoffeeScript is a programming language inspired by Ruby, Python and Haskell that transpiles to JavaScript.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="constant.md">Constant</h4><p>A constant is a value, associated with an identifier. The value of a constant can be accessed using the identifier and cannot be altered during execution.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="constructor.md">Constructor</h4><p>In class-based object-oriented programming, a constructor is a special type of function called to instantiate an object. Constructors often accept arguments that are commonly used to set member properties.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="continuous-deployment.md">Continuous Deployment</h4><p>Continuous Deployment follows the testing that happens during Continuous Integration and pushes changes to a staging or production system. Continuous Deployment ensures that a version of the codebase is accessible at all times.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="continuous-integration.md">Continuous Integration</h4><p>Continuous Integration (CI) is the practice of testing each change done to a codebase automatically and as early as possible. Two popular CI systems that integrate with GitHub are Travis CI and Circle CI.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="cors.md">CORS</h4><p>Cross-Origin Resource Sharing (known as CORS) is a mechanism that uses extra HTTP headers to tell a browser to let a web application running at one domain have permission to access resources from a server at a different domain.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="cross-site-scripting-xss.md">Cross-site scripting (XSS)</h4><p>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.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="css.md">CSS</h4><p>CSS stands for Cascading Style Sheets and is a language used to style web pages. CSS documents are plaintext documents structured with rules, which consist of element selectors and property-value pairs that apply the styles to the specified selectors.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="csv.md">CSV</h4><p>CSV stands for Comma-Separated Values and is a storage format for tabular data. CSV documents are plaintext documents where each line represents a table row, with table columns separated by commas or some other delimiter (e.g. semicolons). The first line of a CSV document sometimes consists of the table column headings for the data to follow.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="currying.md">Currying</h4><p>Currying is a way of constructing functions that allows partial application of a function's arguments. Practically, this means that a function is broken down into a series of functions, each one accepting part of the arguments.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="deserialization.md">Deserialization</h4><p>Deserialization is the process of converting a format that has been transferred over a network and/or used for storage to an object or data structure. A common type of deserialization in JavaScript is the conversion of JSON string into an object.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="dns.md">DNS</h4><p>A DNS (Domain Name System) translates domain names to the IP addresses needed to find a particular computer service on a network.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="dom.md">DOM</h4><p>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.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="domain-name-registrar.md">Domain name registrar</h4><p>A domain name registrar is a company that manages the reservation of internet domain names. A domain name registrar must be approved by a general top-level domain (gTLD) registry or a country code top-level domain (ccTLD) registry.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="domain-name.md">Domain name</h4><p>A domain name is a website's address on the Internet, used primarily in URLs to identify the server for each webpage. A domain name consists of a hierarchical sequence of names, separated by dots and ending with an extension.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="element.md">Element</h4><p>A JavaScript representation of a DOM element commonly returned by <code>document.querySelector()</code> and <code>document.createElement()</code>. They are used when creating content with JavaScript for display in the DOM that needs to be programatically generated.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="es6.md">ES6</h4><p>ES6 stands for ECMAScript 6 (also known as ECMAScript 2015), a version of the ECMAScript specification that standardizes JavaScript. ES6 adds a wide variety of new features to the specification, such as classes, promises, generators and arrow functions.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="event-driven-programming.md">Event-driven programming</h4><p>Event-driven programming is a programming paradigm in which the flow of the program is determined by events (e.g. user actions, thread messages, sensor outputs). In event-driven applications, there is usually a main loop that listens for events and trigger callback functions accordingly when one of these events is detected.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="event-loop.md">Event loop</h4><p>The event loop handles all asynchronous callbacks. Callbacks are queued in a loop, while other code runs, and will run one by one when the response for each one has been received. The event loop allows JavaScript to perform non-blocking I/O operations, despite the fact that JavaScript is single-threaded.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="express.md">Express</h4><p>Express is a backend framework, that provides a layer of fundamental web application features for Node.js. Some of its key features are routing, middleware, template engines and error handling.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="factory-functions.md">Factory functions</h4><p>In JavaScript, a factory function is any function, which is not a class or constructor, that returns a new object. Factory functions don't require the use of the <code>new</code> keyword.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="first-class-function.md">First-class function</h4><p>A programming language is said to have first-class functions if it treats them as first-class citizens, meaning they can be passed as arguments, be returned as values from other functions, be assigned to variables and stored in data structures.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="flexbox.md">Flexbox</h4><p>Flexbox is a one-dimensional layout model used to style websites as a property that could advance space distribution between items and provide powerful alignment capabilities.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="function.md">Function</h4><p>Functions are self-contained blocks of code with their own scope, that can be called by other code and are usually associated with a unique identifier. Functions accept input in the form of arguments and can optionally return an output (if no <code>return</code> statement is present, the default value of <code>undefined</code> will be returned instead). JavaScript functions are also objects.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="functional-programming.md">Functional programming</h4><p>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.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="functor.md">Functor</h4><p>A Functor is a data type common in functional programming that implements a <code>map</code> method. The <code>map</code> method takes a function and applies it to the data in the Functor, returning a new instance of the Functor with the result. JavaScript <code>Array</code>s are an example of the Functor data type.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="garbage-collection.md">Garbage collection</h4><p>Garbage collection is a form of automatic memory management. It attempts to reclaim memory occupied by objects that are no longer used by the program.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="git.md">Git</h4><p>Git is an open-source version control system, used for source code management. Git allows users to copy (clone) and edit code on their local machines, before merging it into the main code base (master repository).</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="higher-order-function.md">Higher-order function</h4><p>Higher-order functions are functions that either take other functions as arguments, return a function as a result, or both.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="hoisting.md">Hoisting</h4><p>Hoisting is JavaScript's default behavior of adding declarations to memory during the compile phase. Hoisting allows for JavaScript variables to be used before the line they were declared on.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="html.md">HTML</h4><p>HTML stands for HyperText Markup Language and is a language used to structure web pages. HTML documents are plaintext documents structured with elements, which are surrounded by <code><></code> tags and optionally extended with attributes.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="http-and-https.md">HTTP and HTTPS</h4><p>The HyperText Transfer Protocol (HTTP) is the underlying network protocol that enables transfer of hypermedia documents on the Web, usually between a client and a server. The HyperText Transfer Protocol Secure (HTTPS) is an encrypted version of the HTTP protocol, that uses SSL to encrypt all data transferred between a client and a server.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="integer.md">Integer</h4><p>Integers are one of the primitive data types in Javascript. They represent a numerical value that has no fractional component.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="integration-testing.md">Integration testing</h4><p>Integration testing is a type of software testing, used to test groups of units/components of a software. The purpose of integration tests are to validate that the units/components interact with each other as expected.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="ip.md">IP</h4><p>An IP address is a number assigned to a device connected to a network that uses the Internet protocol. Two IP versions are currently in use - IPv4, the older version of the communication protocol (e.g. 192.168.1.100) and IPv6, the newest version of the communication protocol which allows for many different IP addresses (e.g. 0:0:0:0:ffff:c0a8:164).</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="jquery.md">jQuery</h4><p>jQuery is a frontend JavaScript library, that simplifies DOM manipulation, AJAX calls and Event handling. jQuery uses its globally defined function, <code>$()</code>, to select and manipulate DOM elements.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="json.md">JSON</h4><p>JSON (JavaScript Object Notation) is a format for storing and exchanging data. It closely resembles the JavaScript object syntax, however some data types, such as dates and functions, cannot be natively represented and need to be serialized first.</p></div></div><div class="card code-card"><div class="section card-content"><p>ajax api argument array asynchronous-programming automatic-semicolon-insertion boolean callback character-encoding class closure coffeescript constant constructor continuous-deployment continuous-integration cors cross-site-scripting-xss css csv currying deserialization dns dom domain-name-registrar domain-name element es6 event-driven-programming event-loop express factory-functions first-class-function flexbox function functional-programming functor garbage-collection git higher-order-function hoisting html http-and-https integer integration-testing ip jquery json keyword_database mdn module mongodb mutabe-value mvc node-js nosql npm object-oriented-programming object prepared-statements promise prototype-based-programming pseudo-class pseudo-element pwa react readme recursion regular-expressions repository responsive-web-design scope selector seo serialization shadowdom sql-injection sql ssl stream strict-mode string svg template-literals typescript unit-testing uri url utf-8 value-vs-reference variable viewport vue webassembly webcomponents webgl webrtc websockets xhtml xml yarn</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="mdn.md">MDN</h4><p>MDN Web Docs, formerly known as Mozilla Developer Network, is the official Mozilla website for development documentation of web standards and Mozilla projects.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="module.md">Module</h4><p>Modules are independent, self-contained pieces of code that can be incorporated into other pieces of code. Modules improve maintainability and reusability of the code.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="mongodb.md">MongoDB</h4><p>MongoDB is a NoSQL database model that stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="mutabe-value.md">Mutable value</h4><p>Mutable value is a type of variable that can be changed once created. Objects are mutable as their state can be modified after they are created. Primitive values are not mutable as we perform reassignment once we change them.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="mvc.md">MVC</h4><p>MVC stands for Model-View-Controller and is a software design pattern, emphasizing separation of concerns (logic and display). The Model part of the MVC pattern refers to the data and business logic, the View handles the layout and display, while the Controller routes commands to the model and view parts.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="node-js.md">Node.js</h4><p>Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js can execute JavaScript code outside of the browser and can be used to develop web backends or standalone applications.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="nosql.md">NoSQL</h4><p>NoSQL databases provide a mechanism to create, update, retrieve and calculate data that is stored in models that are non-tabular.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="npm.md">Npm</h4><p>Npm is a package manager for the JavaScript programming language and the default package manager for Node.js. It consists of a command-line client and the npm registry, an online database of packages.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="object-oriented-programming.md">Object-oriented programming</h4><p>Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which may contain both data and procedures which can be use to operate on them. JavaScript supports Object-oriented programming both via prototypes and classes.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="object.md">Object</h4><p>Objects are data structures that contain data and instructions for working with the data. Objects consist of key-value pairs, where the keys are alphanumeric identifiers and the values can either be primitives or objects. JavaScript functions are also objects.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="prepared-statements.md">Prepared statements</h4><p>In databases management systems, prepared statements are templates that can be used to execute queries with the provided values substituting the template's parameters. Prepared statements offer many benefits, such as reusability, maintainability and higher security.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="promise.md">Promise</h4><p>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).</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="prototype-based-programming.md">Prototype-based programming</h4><p>Prototype-based programming is a style of object-oriented programming, where inheritance is based on object delegation, reusing objects that serve as prototypes. Prototype-based programming allows the creation of objects before defining their classes.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="pseudo-class.md">Pseudo-class</h4><p>In CSS, a pseudo-class is used to define a special state of an element and can be used as a selector in combination with an id, element or class selector.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="pseudo-element.md">Pseudo-element</h4><p>In CSS, a pseudo-element is used to style specific parts of an element and can be used as a selector in combination with an id, element or class selector.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="pwa.md">PWA</h4><p>Progressive Web App (known as PWA) is a term used to describe web applications that load like regular websites but can offer the user functionality such as working offline, push notifications, and device hardware access that were traditionally available only to native mobile applications.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="react.md">React</h4><p>React is a frontend framework, that allows developers to create dynamic, component-based user interfaces. React separates view and state, utilizing a virtual DOM to update the user interface.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="recursion.md">Recursion</h4><p>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.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="regular-expressions.md">Regular expressions</h4><p>Regular expressions (known as regex or regexp) are patterns used to match character combinations in strings. JavaScript provides a regular expression implementation through the <code>RegExp</code> object.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="repository.md">Repository</h4><p>In a version control system, a repository (or repo for short) is a data structure that stores metadata for a set of files (i.e. a project).</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="responsive-web-design.md">Responsive web design</h4><p>Responsive web design is a web development concept aiming to provide optimal behavior and performance of websites on all web-enabled devices. Responsive web design is usually coupled with a mobile-first approach.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="scope.md">Scope</h4><p>Each function has its own scope, and any variable declared within that function is only accessible from that function and any nested functions.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="selector.md">Selector</h4><p>A CSS selector is a pattern that is used to select and/or style one or more elements in a document, based on certain rules. The order in which CSS selectors apply styles to elements is based on the rules of CSS specificity.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="seo.md">SEO</h4><p>SEO stands for Search Engine Optimization and refers to the process of improving a website's search rankings and visibility.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="serialization.md">Serialization</h4><p>Serialization is the process of converting an object or data structure into a format suitable for transfer over a network and/or storage. A common type of serialization in JavaScript is the conversion of an object into a JSON string.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="shadowdom.md">Shadow DOM</h4><p>Shadow DOM allows you to attach hidden DOM trees to elements in the normal DOM tree, which are included in the document rendering, but excluded from the main document DOM tree. A shadow DOM tree will start with a shadow root, to which you can attach any elements you want, just like in a regular DOM. Examples of shadow DOM uses are the <code><video></code>/<code><audio></code> elements and the simple <code><input type="range"></code> element.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="sql-injection.md">SQL injection</h4><p>SQL injection is a code injection technique, used to attack data-driven applications. SQL injections get their name from the SQL language and mainly target data stored in relational databases.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="sql.md">SQL</h4><p>SQL stands for Structured Query Language and is a language used to create, update, retrieve and calculate data in table-based databases. SQL databases use a relational database model and are particularly useful in handlind structured data with relations between different entities.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="ssl.md">SSL</h4><p>Secure Sockets Layer, commonly known as SSL or TLS, is a set of protocols and standards for transferring private data across the Internet. SSL uses a cryptographic system that uses two keys to encrypt data.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="stream.md">Stream</h4><p>A stream is a sequence of data made available over time, often due to network transmission or storage access times.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="strict-mode.md">Strict mode</h4><p>JavaScript's strict mode is a JavaScript feature that allows developers to use a more restrictive variant of JavaScript and it can be enabled by adding <code>'use strict';</code> at the very top of their code. Strict mode elimiated some silent errors, might improve performance and changes the behavior of <code>eval</code> and <code>arguments</code> among other things.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="string.md">String</h4><p>Strings are one of the primitive data types in JavaScript. They are sequences of characters and are used to represent text.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="svg.md">SVG</h4><p>SVG stands for Scalable Vector Graphics and is a 2D vector image format based on an XML syntax. SVG images can scale infinitely and can utilize clipping, masking, filters, animations etc.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="template-literals.md">Template literals</h4><p>Template literals are strings that allow embedded expressions. They support multi-line strings, expression interpolation and nesting.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="typescript.md">TypeScript</h4><p>TypeScript is a superset of JavaScript, adding optional static typing to the language. TypeScript compiles to plain JavaScript.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="unit-testing.md">Unit testing</h4><p>Unit testing is a type of software testing, used to test individual units/components of a software. The purpose of unit tests are to validate that each individual unit/component performs as designed.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="uri.md">URI</h4><p>URI stands for Uniform Resource Identifier and is a text string referring to a resource. A common type of URI is a URL, which is used for the identification of resources on the Web.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="url.md">URL</h4><p>URL stands for Uniform Resource Locator and is a text string specifying where a resource can be found on the Internet. In the HTTP protocol, URLs are the same as web addresses and hyperlinks.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="utf-8.md">UTF-8</h4><p>UTF-8 stands for UCS Transformation Format 8 and is a commonly used character encoding. UTF-8 is backwards compatible with ASCII and can represent any standard Unicode character.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="value-vs-reference.md">Value vs reference</h4><p>When passing a variable by value, a copy of the variable is made, meaning that any changes made to the contents of the variable will not be reflected in the original variable. When passing a variable by reference, the memory address of the actual variable is passed to the function or variable, meaning that modifying the variable's contents will be reflected in the original variable. In JavaScript primitive data types are passed by value while objects are passed by reference.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="variable.md">Variable</h4><p>A variable is a storage location, associated with an identifier and containing a value. The value of a variable can be referred using the identifier and can be altered during execution.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="viewport.md">Viewport</h4><p>A viewport is a polygonal (usually rectangular) area in computer graphics that is currently being viewed. In web development and design, it refers to the visible part of the document that is being viewed by the user in the browser window.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="vue.md">Vue</h4><p>Vue.js is a progressive frontend framework for building user interfaces. Vue.js separates view and state, utilizing a virtual DOM to update the user interface.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="webassembly.md">WebAssembly</h4><p>WebAssembly (WA) is a web standard that defines an assembly-like text format and corresponding binary format for executalbe code in web pages. WebAssembly is meant to complement JavaScript and improve its performance to match native code performance.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="webcomponents.md">Web Components</h4><p>Web Components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use on web pages and apps. Building custom components using these standards means that you can use them across modern browsers regardless of any JavaScript library or framework.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="webgl.md">WebGL</h4><p>WebGL stands for Web Graphics Library and is a JavaScript API that can be used for drawing interactive 2D and 3D graphics. WebGL is based on OpenGL and can be invoked within HTML <code><canvas></code> elements, which provide a rendering surface.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="webrtc.md">WebRTC</h4><p>WebRTC stands for Web Real-Time Communication and is an API that can be used for video-chat, voice-calling and P2P-file-sharing web apps.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="websockets.md">WebSockets</h4><p>WebSockets is a protocol that allows for a persistent client-server TCP connection. The WebSocket protocol uses lower overheads, facilitating real-time data transfer between client and server.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="xhtml.md">XHTML</h4><p>XHTML stands for EXtensible HyperText Markup Language and is a language used to structure web pages. XHTML is a reformulation of the HTML document structure as an application of XML.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="xml.md">XML</h4><p>XML stands for eXtensible Markup Language and is a generic markup language specified by the W3C. XML documents are plaintext documents structured with user-defined tags, surrounded by <code><></code> and optionally extended with attributes.</p></div></div><div class="card code-card"><div class="section card-content"><h4 id="yarn.md">Yarn</h4><p>Yarn is a package manager made by Facebook. It can be used as an alternative to the npm package manager and is compatible with the public NPM registry.</p></div></div></main><footer class="col-full-width container"><div class="col-centered"><p style="display:inline-block"><strong>30 seconds of code</strong> is licensed under the <a href="https://github.com/30-seconds/30-seconds-of-code/blob/master/LICENSE">CC0-1.0</a> license.<br>Logos made by <a href="https://github.com/Chalarangelo">Angelos Chalaris</a> and ribbon made by <a href="https://github.com/tholman/github-corners">Tim Holman</a> are licensed under the <a href="https://opensource.org/licenses/MIT">MIT</a> license.</p><br/><p style="display:inline-block"><a href="./about">About</a> <a href="./contributing">Contributing</a> <a href="./archive">Archive</a> <a href="./glossary">Glossary</a></p></div></footer><a class="scroll-to-top" href="#top"></a></div></body></html> |